Conditions | 3 |
Paths | 3 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3.0123 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | 1 | public static function invalidOptions($dimensions, $currentDimension = null) |
|
27 | { |
||
28 | 1 | $position = []; |
|
29 | |||
30 | 1 | foreach ($dimensions as $dimension) { |
|
31 | 1 | if ($dimension === $currentDimension) { |
|
32 | break; |
||
33 | } |
||
34 | 1 | $position[] = $dimension; |
|
35 | } |
||
36 | |||
37 | 1 | return new static( |
|
38 | sprintf( |
||
39 | 'Configuration must either be of type "array" or implement "\ArrayAccess". ' . |
||
40 | 1 | 'Configuration position is "%s"', |
|
41 | 1 | rtrim(implode('.', $position), '.') |
|
42 | ) |
||
43 | ); |
||
44 | } |
||
45 | } |
||
46 |