Example #1
0
 /**
  * @param CodeBase $code_base
  * The code base in which the function exists
  *
  * @param Func $function
  * A function being analyzed
  *
  * @return void
  */
 public function analyzeFunction(CodeBase $code_base, Func $function)
 {
     // As an example, we test to see if the name of the
     // function is `function`, and emit an issue if it is.
     if ($function->getName() == 'function') {
         $this->emitIssue($code_base, $function->getContext(), 'DemoPluginFunctionName', "Function {$function->getFQSEN()} cannot be called `function`");
     }
 }