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

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

Open IanDelMar opened this issue 1 year ago • 2 comments

__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.

IanDelMar avatar May 17 '24 20:05 IanDelMar

I see this

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

szepeviktor avatar May 17 '24 21:05 szepeviktor

It's not intended, no.

johnbillion avatar May 19 '24 19:05 johnbillion