| Conditions | 6 |
| Paths | 2 |
| Total Lines | 21 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 2 | Features | 0 |
| 1 | <?php |
||
| 22 | public function register(): void |
||
| 23 | { |
||
| 24 | foreach ($this->macrosParams as [$operatorName, $operator]) { |
||
| 25 | Builder::macro( |
||
| 26 | "where{$operatorName}", |
||
| 27 | fn ($left, $right) => $this->whereRaw( |
||
|
|
|||
| 28 | sprintf('%s %s %s', |
||
| 29 | $left instanceof Range ? $left->forSql() : $left, |
||
| 30 | $operator, |
||
| 31 | $right instanceof Range ? $right->forSql() : $right |
||
| 32 | ) |
||
| 33 | ) |
||
| 34 | ); |
||
| 35 | |||
| 36 | Builder::macro( |
||
| 37 | "orWhere{$operatorName}", |
||
| 38 | fn ($left, $right) => $this->orWhereRaw( |
||
| 39 | sprintf('%s %s %s', |
||
| 40 | $left instanceof Range ? $left->forSql() : $left, |
||
| 41 | $operator, |
||
| 42 | $right instanceof Range ? $right->forSql() : $right |
||
| 43 | ) |
||
| 49 |
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.