szepeviktor / phpstan-wordpress

WordPress extensions for PHPStan ⛏️
https://packagist.org/packages/szepeviktor/phpstan-wordpress
MIT License
262 stars 26 forks source link

`__return_null()` in `add_filter()` causes error #221

Closed IanDelMar closed 2 months ago

IanDelMar commented 3 months ago

__return_null() in add_filter() causes a Filter callback return statement is missing. error. See #220. Is this intended?

Note, there is no error with the lowest supported version of PHPStan.

szepeviktor commented 3 months ago

I see this

https://github.com/szepeviktor/phpstan-wordpress/blob/74b9e2f572b51cab33259b3c55a88050d3cbe28b/src/HookCallbackRule.php#L211-L231

johnbillion commented 3 months ago

It's not intended, no.