PHP: Variable function name (function pointer) called ; How to tell IDE my function is called?
mark used methods in phpdoc as @used example
/**
* @uses _iAmUsed()
* @param string $whoAreYou
*/
public function run($whoAreYou)
{
$methodName = '_iAm' . $whoAreYou;
if (method_exists($this, $methodName)) {
$this->$methodName();
}
}
Add a noinspection
annotation above the method:
/** @noinspection PhpUnusedPrivateMethodInspection */
private function _iAmUsed()
{
//Do Stuff...
}
Or after running code analysis you can right-click any inspection in the results window and choose Suppress for statement to have PHPStorm add the proper annotation itself. For more information see http://www.jetbrains.com/phpstorm/webhelp/suppressing-inspections.html