Author: Manuel Pichler (mapi@phpmd.org)
Inheritance: extends PHPMD\Rule\AbstractLocalVariable, implements FunctionAware, implements MethodAware
 /**
  * testLocalVariableUsedInDoubleQuoteStringGetsNotReported
  *
  * @return void
  */
 public function testLocalVariableUsedInDoubleQuoteStringGetsNotReported()
 {
     $rule = new UnusedLocalVariable();
     $rule->setReport($this->getReportMock(0));
     $rule->apply($this->getMethod());
 }
 /**
  * testRuleDoesNotApplyToAnySuperGlobalVariable
  *
  * @return void
  */
 public function testRuleDoesNotApplyToAnySuperGlobalVariable()
 {
     $rule = new UnusedLocalVariable();
     $rule->setReport($this->getReportMock(0));
     $rule->apply($this->getMethod());
 }
示例#3
0
 /**
  * @test
  * @return void
  * @since 2.0.1
  */
 public function test_namespaced_compact_function_rule_works_case_insensitive()
 {
     $rule = new UnusedLocalVariable();
     $rule->setReport($this->getReportMock(0));
     $rule->apply($this->getMethod());
 }