From 9b806f620c0db857a2902bbb40d286ace26d7faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Dvo=C5=99=C3=A1k?= Date: Tue, 23 Jun 2015 17:06:50 +0200 Subject: [PATCH] Declared missing method in abstract class This adds a declaration for 'apply' method to prevent fatal errors with hhvm as mentioned in #179. --- src/main/php/PHPMD/AbstractRule.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/php/PHPMD/AbstractRule.php b/src/main/php/PHPMD/AbstractRule.php index d31ca67a2..345beb432 100644 --- a/src/main/php/PHPMD/AbstractRule.php +++ b/src/main/php/PHPMD/AbstractRule.php @@ -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); }