Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 3 | ||
Bugs | 1 | Features | 2 |
1 | <?php |
||
22 | 2 | public function apply(AbstractNode $node) |
|
23 | { |
||
24 | 2 | $suffixes = $this->getStringProperty('suffixes'); |
|
25 | 2 | $generalSuffixes = explode($this->getStringProperty('delimiter'), $suffixes); |
|
26 | |||
27 | 2 | foreach ($generalSuffixes as $generalSuffix) { |
|
28 | 2 | if ($generalSuffix === substr($node->getImage(), strlen($generalSuffix) * -1)) { |
|
29 | 1 | $this->addViolation($node, [$suffixes, $generalSuffix]); |
|
30 | 1 | break; |
|
31 | } |
||
32 | 2 | } |
|
33 | 2 | } |
|
34 | } |
||
35 |