Brad Miller
Brad Miller
typehinting a return as void is a little strange when you expect to consume the return value, void means "this wont ever return a value to consume" whereas null means...
phpstan does understand how the parameters of `rand` affect it's output, and you can see that in this playground: https://phpstan.org/r/03208a7b-ec5d-4795-9f7c-3932dd793dcb i've also added an example using the `match` statement that...
i tried that but it seemed to break the templating by using `array-key` or even `int|string` and i couldn't quite figure out why when using `array-key` it reverted to showing...
not sure what's going on with the remaining 2 failed actions there, if there's something i need to do let me know
Thanks @williamdes for your swift and friendly response, as always!
Would love to see support for array-shapes using the `array{}` syntax adopted by many major tools! I don't think inventing a new syntax to allow commenting the meaning of array...
there is this repo @artfulrobot: https://github.com/bmewburn/intelephense-docs
phpstan currently models types as possibility sets, not control flow, you can learn more from [this talk](https://www.youtube.com/watch?v=85Aq2rWpGQE)
sorry @arderyp i misunderstood the error mesage myself, i thought it was stating that because the method is generic over a single class, but has the possibility to return either...
@thg2k i also stumbled across that while debugging and made a separate issue https://github.com/phpstan/phpstan/issues/7803