The PHPStan component of the Salient toolkit
salient/phpstan provides PHPStan extensions for development with the Salient
toolkit.
| Extension | Method |
|---|---|
ArrExtendReturnTypeExtension |
Arr::extend() |
ArrFlattenReturnTypeExtension |
Arr::flatten() |
ArrWhereNotEmptyReturnTypeExtension |
Arr::whereNotEmpty() |
ArrWhereNotNullReturnTypeExtension |
Arr::whereNotNull() |
GetCoalesceReturnTypeExtension |
Get::coalesce() |
StrCoalesceReturnTypeExtension |
Str::coalesce() |
| 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 |
| Extension | Description |
|---|---|
ImmutableTraitReadWritePropertiesExtension |
Properties visible to ImmutableTrait methods are always read and written |
API documentation for salient/phpstan tracks the main branch of
the toolkit's GitHub repository, where further documentation can also
be found.