26 lines
1.2 KiB
Plaintext
26 lines
1.2 KiB
Plaintext
parameters:
|
|
level: 8
|
|
# The library's floor. The type tests use the 8.5 pipe operator, so they have their own config:
|
|
# phpstan.types.neon. `composer phpstan` runs both.
|
|
phpVersion: 80200
|
|
paths:
|
|
- src
|
|
ignoreErrors:
|
|
-
|
|
# Eager transforms are typed with a conditional closure type that maps the input container to the result
|
|
# container (see keyedLike()/listLike(), which implement it). PHPStan can't check a closure literal
|
|
# against such a type, so only that mismatch is ignored.
|
|
identifier: return.type
|
|
message: '#^Function Kadet\\Functional\\Collections\\\w+\(\) should return Closure<TIn of iterable>\(TIn\): \(TIn is array \?#'
|
|
path: src/Collections/transforms.php
|
|
-
|
|
# toArray() keeps PHP's own coercion of bool, float and null keys, as an array literal would.
|
|
identifier: offsetAccess.invalidOffset
|
|
message: '#^Possibly invalid array key type bool\|float\|int\|string\|null\.$#'
|
|
path: src/Collections/collectors.php
|
|
|
|
includes:
|
|
# Errors in the code that predates PHPStan in this project (untyped pre-1.0 functions and classes). New code
|
|
# must pass without entries here.
|
|
- phpstan-baseline.neon
|