| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function __invoke() |
||
| 20 | { |
||
| 21 | return function ($callback, bool $preserveKeys = false, $modelKey = 0, $itemsKey = 1): Collection { |
||
| 22 | $callback = $this->valueRetriever($callback); |
||
|
|
|||
| 23 | |||
| 24 | return $this->groupBy(function ($item) use ($callback) { |
||
| 25 | return $callback($item)->getKey(); |
||
| 26 | }, $preserveKeys)->map(function (Collection $items) use ($callback, $modelKey, $itemsKey) { |
||
| 27 | return [ |
||
| 28 | $modelKey => $callback($items->first()), |
||
| 29 | $itemsKey => $items, |
||
| 30 | ]; |
||
| 31 | })->values(); |
||
| 32 | }; |
||
| 33 | } |
||
| 34 | } |
||
| 35 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.