Conditions | 5 |
Paths | 1 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function sortByDate(): self |
||
24 | { |
||
25 | return $this->usort(function ($a, $b) { |
||
26 | if (!isset($a['date'])) { |
||
27 | return -1; |
||
28 | } |
||
29 | if (!isset($b['date'])) { |
||
30 | return 1; |
||
31 | } |
||
32 | if ($a['date'] == $b['date']) { |
||
33 | return 0; |
||
34 | } |
||
35 | |||
36 | return ($a['date'] > $b['date']) ? -1 : 1; |
||
37 | }); |
||
38 | } |
||
39 | |||
52 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.