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
Conversation
…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".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SeedObjectServiceStubwas missingfindAll(array $params = []): array, causingSeedDataService::findByFilter()to crash with "Call to undefined method" in two tests. AddedfindAllto the interface and updated the two test mocks to stubfindAll(matching what production code actually calls) instead of the stalegetObjectsmethod. Production code was not changed.$event instanceof ParafeerTransitionEvent === false→!($event instanceof ParafeerTransitionEvent)inParaferingAuditListener.php:70andis_array($location) === false→!is_array($location)inWfsExportService.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 passingvendor/bin/phpunit— 153 tests, 434 assertions, all passingcomposer phpstan— was 2 errors, now 0 errors