| Conditions | 9 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 61 | public function default(): callable |
||
| 62 | { |
||
| 63 | return function ($current, $next) { |
||
| 64 | $current = $this->lower($current); |
||
| 65 | $next = $this->lower($next); |
||
| 66 | |||
| 67 | if ($current === $next) { |
||
| 68 | return 0; |
||
| 69 | } |
||
| 70 | |||
| 71 | if (is_string($current) && is_numeric($next)) { |
||
| 72 | return $this->hasSpecialChar($current) ? -1 : 1; |
||
| 73 | } |
||
| 74 | |||
| 75 | if (is_numeric($current) && is_string($next)) { |
||
| 76 | return $this->hasSpecialChar($next) ? 1 : -1; |
||
| 77 | } |
||
| 78 | |||
| 79 | return $current < $next ? -1 : 1; |
||
| 80 | }; |
||
| 107 |