| Conditions | 9 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 9 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 60 | 14 | public function defaultCallback(): callable |
|
| 61 | { |
||
| 62 | 14 | return function ($current, $next) { |
|
| 63 | 14 | $current = $this->lower($current); |
|
| 64 | 14 | $next = $this->lower($next); |
|
| 65 | |||
| 66 | 14 | if ($current === $next) { |
|
| 67 | 2 | return 0; |
|
| 68 | } |
||
| 69 | |||
| 70 | 14 | if (is_string($current) && is_numeric($next)) { |
|
| 71 | 8 | return $this->hasSpecialChar($current) ? -1 : 1; |
|
| 72 | } |
||
| 73 | |||
| 74 | 14 | if (is_numeric($current) && is_string($next)) { |
|
| 75 | 6 | return $this->hasSpecialChar($next) ? 1 : -1; |
|
| 76 | } |
||
| 77 | |||
| 78 | 14 | return $current < $next ? -1 : 1; |
|
| 79 | 14 | }; |
|
| 106 |