salient / phpstan
The PHPStan component of the Salient toolkit
v0.99.81
2025-11-17 05:42 UTC
Requires
- php: >=7.4
- phpstan/phpstan: ^2
- salient/utils: v0.99.81
This package is auto-updated.
Last update: 2026-05-20 14:59:59 UTC
README
The PHPStan component of the Salient toolkit
salient/phpstan provides PHPStan extensions for development with the Salient
toolkit.
Extensions
Dynamic return type
| Extension | Method |
|---|---|
ArrExtendReturnTypeExtension |
Arr::extend() |
ArrFlattenReturnTypeExtension |
Arr::flatten() |
ArrWhereNotEmptyReturnTypeExtension |
Arr::whereNotEmpty() |
ArrWhereNotNullReturnTypeExtension |
Arr::whereNotNull() |
GetCoalesceReturnTypeExtension |
Get::coalesce() |
StrCoalesceReturnTypeExtension |
Str::coalesce() |
Custom rule
| Extension | Description | Error identifiers |
|---|---|---|
ContainerRule |
Checks calls to ContainerInterface methods | salient.service.type |
GetCoalesceRule |
Checks for unnecessary use of Get::coalesce() | salient.needless.coalesce |
ImmutableTraitRule |
Checks calls to ImmutableTrait methods with() and without() |
salient.property.notFoundsalient.property.privatesalient.property.type |
Always-read and written properties
| Extension | Description |
|---|---|
ImmutableTraitReadWritePropertiesExtension |
Properties visible to ImmutableTrait methods are always read and written |
Documentation
API documentation for salient/phpstan tracks the main branch of
the toolkit's GitHub repository, where further documentation can also
be found.