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