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