fix: PHPStan and test strictness improvements
Add bin/ scripts to PHPStan scanFiles, suppress property.onlyWritten for by-ref test properties, add exhaustive default match arm, use explicit expects() on mock stubs, fix data provider return type, and simplify redundant null check in NotificationServiceTest. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,7 @@ class SettingsDefaultsGatewayTest extends TestCase
|
||||
'setDefaultTenantId' => $tenantRepository->expects($this->once())->method('find')->with($id)->willReturn(null),
|
||||
'setDefaultRoleId' => $roleRepository->expects($this->once())->method('find')->with($id)->willReturn(null),
|
||||
'setDefaultDepartmentId' => $departmentRepository->expects($this->once())->method('find')->with($id)->willReturn(null),
|
||||
default => throw new \LogicException("Unknown setter: {$setter}"),
|
||||
};
|
||||
|
||||
$this->assertFalse($gateway->$setter($id));
|
||||
|
||||
Reference in New Issue
Block a user