| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 16 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | 25 | public function boot(): void |
|
| 14 | { |
||
| 15 | 25 | Builder::macro('hasByNonDependentSubquery', function (...$args) { |
|
|
|
|||
| 16 | /** @var \Illuminate\Database\Eloquent\Builder $query */ |
||
| 17 | 21 | $query = $this; |
|
| 18 | 21 | return (new HasByNonDependentSubqueryMacro($query))->has(...$args); |
|
| 19 | 25 | }); |
|
| 20 | 25 | 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 | 25 | }); |
|
| 25 | 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 | 25 | }); |
|
| 30 | 25 | 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 | 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.