Feature request
Method like Closure::bindTo() could return null for static closure but will never for non-static closure.
It would be interesting for multiple rule to keep the information if a closure is static or not.
We should introduce isStatic TrinaryLogic param in ClosureType constructor and a isStaticClosure method.
But it needs to be checked in equals, isSuperTypeOf and correctly merged.
Also when it’s not maybe, I argue it should also be in describe(), definitely in precise() and cache() levels
Some rules can react to it when it’s yes().
For example when passing a static closure to a function that has @param-closure-this .
It has to be extensive testing in TypeCombinator
Also might make sense to add isStaticClosure(): TrinaryLogic to CallableParametersAcceptor.
Did PHPStan help you today? Did it make you happy in any way?
No response
Feature request
Method like
Closure::bindTo()could return null for static closure but will never for non-static closure.It would be interesting for multiple rule to keep the information if a closure is static or not.
We should introduce
isStaticTrinaryLogic param in ClosureType constructor and a isStaticClosure method.But it needs to be checked in equals, isSuperTypeOf and correctly merged.
Also when it’s not maybe, I argue it should also be in describe(), definitely in precise() and cache() levels
Some rules can react to it when it’s yes().
For example when passing a static closure to a function that has @param-closure-this .
It has to be extensive testing in TypeCombinator
Also might make sense to add isStaticClosure(): TrinaryLogic to CallableParametersAcceptor.
Did PHPStan help you today? Did it make you happy in any way?
No response