| Conditions | 5 |
| Paths | 16 |
| Total Lines | 24 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function scopeWithSchemalessAttributes(): Builder |
||
| 24 | { |
||
| 25 | $arguments = func_get_args(); |
||
| 26 | |||
| 27 | if (count($arguments) === 1) { |
||
| 28 | [$builder] = $arguments; |
||
| 29 | $schemalessAttributes = []; |
||
| 30 | } |
||
| 31 | |||
| 32 | if (count($arguments) === 2) { |
||
| 33 | [$builder, $schemalessAttributes] = $arguments; |
||
| 34 | } |
||
| 35 | |||
| 36 | if (count($arguments) >= 3) { |
||
| 37 | [$builder, $name, $value] = $arguments; |
||
| 38 | $schemalessAttributes = [$name => $value]; |
||
| 39 | } |
||
| 40 | |||
| 41 | foreach ($schemalessAttributes as $name => $value) { |
||
| 42 | $builder->where("schemaless_attributes->{$name}", $value); |
||
| 43 | } |
||
| 44 | |||
| 45 | return $builder; |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.