Skip to content

Commit

Permalink
Declared missing method in abstract class
Browse files Browse the repository at this point in the history
This adds a declaration for 'apply' method to prevent fatal
errors with hhvm as mentioned in #179.
  • Loading branch information
RadekDvorak committed Jun 23, 2015
1 parent 530e0b5 commit 9b806f6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/php/PHPMD/AbstractRule.php
Expand Up @@ -407,4 +407,13 @@ protected function addViolation(
$ruleViolation = new RuleViolation($this, $node, $message, $metric);
$this->report->addRuleViolation($ruleViolation);
}

/**
* This method should implement the violation analysis algorithm of concrete
* rule implementations. All extending classes must implement this method.
*
* @param \PHPMD\AbstractNode $node
* @return void
*/
abstract public function apply(AbstractNode $node);
}

0 comments on commit 9b806f6

Please sign in to comment.