Static analysis rules
Neither analyser package has an @api class, and that is correct rather than a missing annotation: understudy-phpstan is registered through extension.neon and understudy-psalm through psalm-plugin enable, so a user never names one of their classes. What a user does write is an identifier, in ignoreErrors or a suppression. That is the contract, so that is what is reflected here.
PHPStan · rasuvaeff/understudy-phpstan v0.2.0
| Identifier | Reported by | Summary |
|---|---|---|
understudy.cardinality | SpecificationCheck | Says what the engine would say, before the test runs. |
understudy.closure | SpecificationCheck | Says what the engine would say, before the test runs. |
understudy.matcher | SpecificationCheck | Says what the engine would say, before the test runs. |
understudy.matcherLeak | MatcherLeakRule | A matcher written outside a specification. |
understudy.returns | VoidReturnsRule | returns() on a method that returns nothing. |
Silence one by its identifier:
neon
parameters:
ignoreErrors:
- identifier: understudy.cardinalityRegistered rules (from extension.neon, in file order):
Rasuvaeff\Understudy\PhpStan\Rule\SpecificationCallRuleRasuvaeff\Understudy\PhpStan\Rule\SpecificationStaticCallRuleRasuvaeff\Understudy\PhpStan\Rule\FluentCardinalityRuleRasuvaeff\Understudy\PhpStan\Rule\VoidReturnsRuleRasuvaeff\Understudy\PhpStan\Rule\MatcherLeakRule
Psalm · rasuvaeff/understudy-psalm v0.2.0
| Issue type | Summary |
|---|---|
UnderstudyMisuse | A specification that cannot mean what it says. |
The plugin reports its own findings under that one issue type; everything else it surfaces is Psalm's own diagnostic, made possible by the types the plugin fills in.
For what each of these means in practice, see Static analysis, the Psalm plugin and the PHPStan extension.