Review main Merged

84351[TASK] Use special PHPUnit ruleset for PHPStan

Ayke Halder CR +2 V +2 Easy +18 −16 updated 05/27/24, 12:48

Commit message

This enables the already available `phpstan-phpunit` rules:
* PHPStan\Rules\PHPUnit\AssertSameBooleanExpectedRule
* PHPStan\Rules\PHPUnit\AssertSameNullExpectedRule
* PHPStan\Rules\PHPUnit\AssertSameWithCountRule
* PHPStan\Rules\PHPUnit\MockMethodCallRule
* PHPStan\Rules\PHPUnit\ShouldCallParentMethodsRule

`ShouldCallParentMethodsRule` is of great interest:
It checks for missing calls to `parent::setUp` and `parent::tearDown`.

`AssertSameWithCountRule` replaces
`assertSame($expectedCount, count($variable))` with
`assertCount($expectedCount, $variable)`.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 12