| Conditions | 4 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | 8 | public function sort($sortBy = SORT_REGULAR, array $options = []): self |
|
| 22 | { |
||
| 23 | 8 | if (!$sortBy) { |
|
| 24 | 4 | $sortBy = SORT_REGULAR; |
|
| 25 | } |
||
| 26 | 8 | if ($sortBy && is_callable($sortBy)) { |
|
| 27 | 2 | $this->sortWithCallback($sortBy, $options); |
|
|
|
|||
| 28 | } else { |
||
| 29 | 6 | $this->sortWithFlags($sortBy, $options); |
|
| 30 | } |
||
| 31 | |||
| 32 | 8 | return $this; |
|
| 33 | } |
||
| 65 |