| 1 | <?php |
||
| 2 | |||
| 3 | namespace Mpyw\EloquentHasByJoin; |
||
| 4 | |||
| 5 | use Illuminate\Database\Eloquent\Builder; |
||
| 6 | use Illuminate\Support\ServiceProvider; |
||
| 7 | |||
| 8 | class EloquentHasByJoinServiceProvider extends ServiceProvider |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Register Eloquent\Builder::hasByJoin() macro. |
||
| 12 | */ |
||
| 13 | 15 | public function boot(): void |
|
| 14 | { |
||
| 15 | 15 | Builder::macro('hasByJoin', function ($relationMethod, ?callable ...$constraints): Builder { |
|
|
0 ignored issues
–
show
|
|||
| 16 | /** @var \Illuminate\Database\Eloquent\Builder $query */ |
||
| 17 | 15 | $query = $this; |
|
| 18 | 15 | return (new HasByJoinMacro($query))($relationMethod, ...$constraints); |
|
| 19 | 15 | }); |
|
| 20 | } |
||
| 21 | } |
||
| 22 |
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.