1 | <?php |
||
4 | trait CollectionSorterTrait |
||
5 | { |
||
6 | /** |
||
7 | * @return $this |
||
|
|||
8 | */ |
||
9 | 1 | public function reindex() |
|
13 | |||
14 | /** |
||
15 | * @param callable $callback |
||
16 | * @return $this |
||
17 | */ |
||
18 | 2 | public function sort(callable $callback) |
|
24 | |||
25 | /** |
||
26 | * @param bool $areKeysPreserved |
||
27 | * @return $this |
||
28 | */ |
||
29 | 1 | public function reverse($areKeysPreserved = true) |
|
33 | |||
34 | /** |
||
35 | * @param bool $areKeysPreserved |
||
36 | * @return $this |
||
37 | */ |
||
38 | 2 | public function shuffle($areKeysPreserved = true) |
|
50 | |||
51 | /** |
||
52 | * @param callable $callback |
||
53 | * @return $this[] |
||
54 | */ |
||
55 | 1 | public function groupBy(callable $callback) |
|
67 | } |
||
68 |
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.