@noinspection PhpIncludeInspection - Have to use this twice??

Is this correct?

if(file_exists(_DOCROOT.'/library/classes/'.$sClassName.'.php'))
  /** @noinspection PhpIncludeInspection */
  require_once
   /** @noinspection PhpIncludeInspection */
   _DOCROOT."/library/classes/$sClassName.php";

If I only use it once, like this, I still get an warning:

if(file_exists(_DOCROOT.'/library/classes/'.$sClassName.'.php'))
  /** @noinspection PhpIncludeInspection */
  require_once _DOCROOT."/library/classes/$sClassName.php";

0
3 comments

Keith,

   I'm not sure I understand the question - is this related to PHPStorm, or are you asking a general PHP question?

0

There are some reported bugs in PhpStorm's suppression code i.e. http://youtrack.jetbrains.net/issue/WI-3492
Can you please submit your case as a separate report so we'll won't miss it?..

0

Please sign in to leave a comment.