Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

fix: phpunit stub sync + phpstan dead-comparisons (fleet quality sweep)#626

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/quality-findings
May 26, 2026
Merged

fix: phpunit stub sync + phpstan dead-comparisons (fleet quality sweep)#626
rubenvdlinde merged 1 commit into
developmentfrom
fix/quality-findings

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Summary

  • PHPUnit (2 tests fixed): SeedObjectServiceStub was missing findAll(array $params = []): array, causing SeedDataService::findByFilter() to crash with "Call to undefined method" in two tests. Added findAll to the interface and updated the two test mocks to stub findAll (matching what production code actually calls) instead of the stale getObjects method. Production code was not changed.
  • PHPStan (2 errors fixed): Rewrote $event instanceof ParafeerTransitionEvent === false!($event instanceof ParafeerTransitionEvent) in ParaferingAuditListener.php:70 and is_array($location) === false!is_array($location) in WfsExportService.php:219. Both were "strict comparison using === between true and false will always evaluate to false" per PHPStan.

Test plan

  • vendor/bin/phpunit --filter "testSeedBezwaarBeroepDataReturnsSummaryStructure|testSeedBezwaarBeroepDataSkipsExistingCaseTypes" — was 2 errors, now 2 passing
  • Full suite vendor/bin/phpunit — 153 tests, 434 assertions, all passing
  • composer phpstan — was 2 errors, now 0 errors

…rites

Add `findAll(array \$params = []): array` to SeedObjectServiceStub so the
interface matches the production `objectService->findAll(...)` call in
SeedDataService::findByFilter(). Update the two test mocks to stub `findAll`
instead of the now-unused `getObjects` method, fixing the two PHPUnit errors.

Rewrite `\$event instanceof ParafeerTransitionEvent === false` in
ParaferingAuditListener and `is_array(\$location) === false` in
WfsExportService to `!(...)` / `!is_array(...)` form so PHPStan no longer
reports "Strict comparison using === between true and false will always
evaluate to false".
@rubenvdlinde rubenvdlinde merged commit a1053b2 into development May 26, 2026
@rubenvdlinde rubenvdlinde deleted the fix/quality-findings branch May 26, 2026 11:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant