- Issue created by @mstrelan
See 📌 Fix strict type errors detected by phpstan Active
There are a number of calls to array functions (e.g. array_map, array_keys, etc) that expect an array, but due to incorrect phpdoc annotations phpstan thinks we're passing something else. Usually this is due to an incorrectly typed multi-dimensional array.
Add checkFunctionArgumentTypes: true
to phpstan.neon.dist
$ ./vendor/bin/phpstan analyse -c core/phpstan.neon.dist --error-format=json | jq '.files | to_entries[]
| .value.messages[] as $m
| select($m.message | test("array of function .* expects"))
| {file: .key, message: $m.message, line: $m.line}'
Note this will reveal a few others, but they are not easily fixed in the same way.
Fix phpdocs
Active
11.0 🔥
other