https://phpstan.org/
Analyse statique de code:
Unknown classes
Unknown functions
Unknown `$this->foo()` calls
$this->foo($wrong, $number, $of, $argument)
Always undefined variable
Possible undefined variable
Unknown magic method with __call
Unknown magic properties with __get
Unknown methods
PHPDoc validation
int
string
bool (true, false)
null
float
array
iterable
callable
resource
void
object
array-key = (int|string)
int<1, 10>
positive-int = int<1, max>
negative-int = int<min, -1>
class-string
non-empty-string
non-falsy-string
non-empty-array
list
non-empty-list
FooClass::TYPE_*
never
Return types
Types assigned to properties
Always false checks
Dead `else` check
Unreachable code after return
Checking type of argument passed to method
Checking type of argument passed to function
Report missing typehint
Report missing iterable value type
Report missing templates in generics
string[]
array<string>
array<array-key, string>
array<int|string, string>
array<string, string>
array<int, string>
array{e: string, 1: string}
array{e: string, f: string}
array{0: string, 1: string}
list<string>
array<array<string, array{id: int, options: array<string, mixed>}>>
Report partially wrong union type
Report partially wrong union type with null
Report calling method on nullable values
Symfony
Doctrine
Todo ?
Conditional return types
Baseline
vendor/bin/phpstan analyse --generate-baseline
https://phpstan.org/try