Is it possible to make PHPStorm ignore the php extract function?

My application is using a plugin system which relies heavily on the native PHP extract() function.
As the very first line of my observable methods I will add
extract(EventManager::pre($this, __FUNCTION__, get_defined_vars()), EXTR_IF_EXISTS);
This will pass my function arguments to my observers, which may modify them before returning them.

The EXTR_IF_EXISTS flag should prevent any new variables from being introduced by the extract method. PHP Storm however does not acknowledge this, and effectively disables the `undefined variable` inspection for the method scope.

Is there a way that I can instruct PHP Storm to ignore the PHP extract() method or this line of code in particular, by meta overrides, docblocs etc, so that the undefined variable inspection would still be available?

0

请先登录再写评论。