Closed
Description
I stumbled upon the behavior when using the following code:
add_action('hook', static function (): void {
static $providerId;
});
It causes Variable $providerId is undefined. (VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable)
For my tests the minimum reproducible snippet was
$test = (function() {
static $test;
});
It seems round brackets do matter.
Thanks for maintaining a very useful library!