parameters: level: 8 # tests/types checks inference through the pipe operator, which needs PHP 8.5 to parse. PHPStan parses with the # lowest configured version, so this can't be a range starting at the library's PHP 8.2 floor; that floor is # covered by running the test suite on PHP 8.2. phpVersion: 80500 paths: - src - tests/types 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\): \(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