Conditions | 4 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 6 | public function apply(AbstractNode $node) |
|
20 | { |
||
21 | 6 | if (false === $this->isController($node->getParentType())) { |
|
22 | 4 | return; |
|
23 | } |
||
24 | |||
25 | 2 | $allowedMethodNames = explode($this->getStringProperty('delimiter'), $this->getStringProperty('allowedMethodNames')); |
|
26 | |||
27 | 2 | if (true === in_array($node->getImage(), $allowedMethodNames)) { |
|
28 | 2 | return; |
|
29 | } |
||
30 | |||
31 | 2 | if ('Action' !== substr($node->getImage(), -6, 6)) { |
|
32 | 2 | $this->addViolation($node); |
|
33 | 2 | } |
|
34 | 2 | } |
|
35 | |||
58 |