Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function getTargetClass($target): int |
||
18 | { |
||
19 | if (!in_array($target, $this->classes, true)) { |
||
20 | throw new InvalidArgumentException( |
||
21 | sprintf('Target with value "%s" is not part of the accepted classes', $target) |
||
22 | ); |
||
23 | } |
||
24 | |||
25 | return array_search($target, $this->classes, true); |
||
|
|||
26 | } |
||
59 |