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