These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Spatie\CollectionMacros\Macros; |
||
4 | |||
5 | use Illuminate\Support\Collection; |
||
6 | |||
7 | /** |
||
8 | * Move elements to the start of the collection. |
||
9 | * |
||
10 | * @param callable $callable |
||
11 | * |
||
12 | * @mixin \Illuminate\Support\Collection |
||
13 | * |
||
14 | * @return \Illuminate\Support\Collection |
||
15 | */ |
||
16 | class Prioritize |
||
17 | { |
||
18 | public function __invoke() |
||
19 | { |
||
20 | return function (callable $callable): Collection { |
||
21 | $nonPrioritized = $this->reject($callable); |
||
22 | |||
23 | return $this |
||
0 ignored issues
–
show
|
|||
24 | ->filter($callable) |
||
25 | ->union($nonPrioritized); |
||
26 | }; |
||
27 | } |
||
28 | } |
||
29 |
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.