PHPStorm variable warnings

I code in PHPStorm and include wp-admin and wp-include in my path, but get code inspection warnings related to undefined / unused variables.

Should I be concerned about these? How would I go about satisfying a resolution to resolve the error (without just turning inspection off)

Topic ide Wordpress

Category Web


If you really want to use it, you can add a comments before your variable like this:

/** @var $number integer */

It will prevent a warnings in PHPStorm.


This happens because you are using extract(), and PHPStorm cannot know where the variable is coming from. Do not use extract(). Ever.

It was removed from almost all WordPress functions, and so should you do.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.