| Conditions | 5 |
| Paths | 1 |
| Total Lines | 16 |
| Lines | 16 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | View Code Duplication | 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 | |||
| 74 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.