| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 29 | public function groupBy(callable $callback) |
||
| 30 | { |
||
| 31 | $results = []; |
||
| 32 | $collection = new Collection($this); |
||
| 33 | foreach ($collection->each($callback) as $key => $result) { |
||
| 34 | if (!isset($results[$result])) { |
||
| 35 | $results[$result] = new $this(); |
||
| 36 | } |
||
| 37 | $results[$result][$key] = $this[$key]; |
||
| 38 | } |
||
| 39 | return $results; |
||
| 40 | } |
||
| 41 | } |
||
| 42 |
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.