Conditions | 1 |
Paths | 1 |
Total Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
13 | 23 | public function boot(): void |
|
14 | { |
||
15 | Builder::macro('hasByNonDependentSubquery', function (...$args) { |
||
|
|||
16 | /** @var \Illuminate\Database\Eloquent\Builder $query */ |
||
17 | 20 | $query = $this; |
|
18 | 20 | return (new HasByNonDependentSubqueryMacro($query))->has(...$args); |
|
19 | 23 | }); |
|
20 | Builder::macro('orHasByNonDependentSubquery', function (...$args) { |
||
21 | /** @var \Illuminate\Database\Eloquent\Builder $query */ |
||
22 | 1 | $query = $this; |
|
23 | 1 | return (new HasByNonDependentSubqueryMacro($query))->orHas(...$args); |
|
24 | 23 | }); |
|
25 | Builder::macro('doesntHaveByNonDependentSubquery', function (...$args) { |
||
26 | /** @var \Illuminate\Database\Eloquent\Builder $query */ |
||
27 | 1 | $query = $this; |
|
28 | 1 | return (new HasByNonDependentSubqueryMacro($query))->doesntHave(...$args); |
|
29 | 23 | }); |
|
30 | Builder::macro('orDoesntHaveByNonDependentSubquery', function (...$args) { |
||
31 | /** @var \Illuminate\Database\Eloquent\Builder $query */ |
||
32 | 1 | $query = $this; |
|
33 | 1 | return (new HasByNonDependentSubqueryMacro($query))->orDoesntHave(...$args); |
|
34 | 23 | }); |
|
35 | } |
||
36 | } |
||
37 |
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.