Conditions | 4 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
62 | 2 | public function passed($entity): bool |
|
63 | { |
||
64 | 2 | foreach ($this->checkers as $checker) { |
|
65 | 2 | if (!($checker instanceof BlocklistChecker)) { |
|
66 | 1 | throw new InvalidArgumentException('$checker should implement BlocklistChecker'); |
|
67 | } |
||
68 | |||
69 | 1 | if (!$checker->check($entity)) { |
|
70 | 1 | return false; |
|
71 | } |
||
72 | } |
||
73 | |||
74 | 1 | return true; |
|
75 | } |
||
77 |