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