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.
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.
Loading history...
17
*/
18
public function sort(callable $callback)
19
{
20
$collection = (array)$this;
21
uasort($collection, $callback);
22
return new $this($collection);
23
}
24
25
/**
26
* @param callable $callback
27
* @return $this[]
28
*/
29
public function groupBy(callable $callback)
30
{
31
$results = [];
32
$collection = new Collection($this);
33
foreach ($collection->each($callback) as $key => $result) {
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.