Conditions | 2 |
Paths | 1 |
Total Lines | 24 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
28 | 21 | public static function map() : array |
|
29 | { |
||
30 | return [ |
||
31 | static::BITWISE => function () { |
||
32 | 6 | static $key; |
|
33 | |||
34 | 6 | if (isset($key)) { |
|
35 | 6 | return $key *= 2; |
|
36 | } |
||
37 | |||
38 | 6 | return $key = 1; |
|
39 | 21 | }, |
|
40 | static::INT0 => function () { |
||
41 | 9 | static $key = 0; |
|
42 | |||
43 | 9 | return $key++; |
|
44 | 21 | }, |
|
45 | static::INT1 => function () { |
||
46 | 3 | static $key = 1; |
|
47 | |||
48 | 3 | return $key++; |
|
49 | 21 | }, |
|
50 | static::LOWER => function (string $name) { |
||
51 | 18 | return Str::lower($name); |
|
52 | 21 | }, |
|
56 |