7 declare(strict_types=1);
11 use PDepend\Source\AST\ASTClass;
12 use PHPMD\AbstractNode;
13 use PHPMD\AbstractRule;
14 use PHPMD\Node\ClassNode;
15 use PHPMD\Rule\ClassAware;
28 public function apply(AbstractNode $node)
31 $impl = class_implements($node->getFullQualifiedName(),
true);
32 }
catch (\Throwable $exception) {
37 if (in_array(ActionInterface::class, $impl,
true)) {
38 $methodsDefined =
false;
39 foreach ($impl as
$i) {
40 if (preg_match(
'/\\\Http[a-z]+ActionInterface$/i',
$i)) {
41 $methodsDefined =
true;
45 if (!$methodsDefined) {
46 $this->addViolation($node, [$node->getFullQualifiedName()]);
apply(AbstractNode $node)