phpstan-src icon indicating copy to clipboard operation
phpstan-src copied to clipboard

Fix array_slice() dynamic return type

Open dravnic opened this issue 2 years ago • 1 comments

When array_slice() offset or limit parameters aren't constants we cannot dynamically override return type, so for those cases return type should stay array.

This PR fixes this and as well it includes minor refactor and tests for array_slice offset/limit parameters as variables.

dravnic avatar Aug 18 '23 19:08 dravnic