Closed herndlm closed 1 year ago
Does PHP allow $this
in a closure? I would not allow it!
Does PHP allow
$this
in a closure? I would not allow it!
sure, there's no reason against it. without such code (and also e.g. with the weird Neutron CS rule that forbids to have a callable assigned to a var) PHPStan wouldn't be able to efficiently parse and handle the AST to figure out types
@IanDelMar let me/us know please what you think of this. I did briefly confirm the test cases with a real WordPress, but I don't know the internals of the escaping function well enough. Maybe @johnbillion can quickly check too :)
@herndlm Looks good to me!
Is it ready to merge?
Closes https://github.com/szepeviktor/phpstan-wordpress/issues/154
Successor of https://github.com/szepeviktor/phpstan-wordpress/pull/163
instanceof
''
in case of an invalid type input