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 | * @return \Illuminate\Support\Collection |
||
13 | */ |
||
14 | class Prioritize |
||
15 | { |
||
16 | public function __invoke() |
||
17 | { |
||
18 | return function (callable $callable): Collection { |
||
19 | $nonPrioritized = $this->reject($callable); |
||
20 | |||
21 | return $this |
||
0 ignored issues
–
show
|
|||
22 | ->filter($callable) |
||
23 | ->concat($nonPrioritized); |
||
24 | }; |
||
25 | } |
||
26 | } |
||
27 |
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.