-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
It doesn't seem like the $wheres variable is used at all. What is it's purpose?
example-plugin/app/Models/Scopes/ApiEnabledScope.php
Lines 40 to 65 in c01afc9
| public function remove(Builder $builder, Model $model) | |
| { | |
| $query = $builder->getQuery(); | |
| $wheres = [ | |
| 'type' => 'Basic', | |
| 'column' => 'post_type', | |
| 'operator' => '>=', | |
| 'value' => 'form', | |
| 'boolean' => 'and', | |
| ]; | |
| foreach ((array) $query->wheres as $key => $where) { | |
| if ($where['type'] !== 'Basic' | |
| || (string) $where['column'] !== '('.self::$apiEnabledScopeColumn.')' | |
| || $where['operator'] !== '>=' | |
| || (int) $where['value'] !== 1 | |
| || $where['boolean'] !== 'and') { | |
| continue; | |
| } | |
| unset($query->wheres[$key]); | |
| $query->wheres = array_values($query->wheres); | |
| } | |
| } |
Metadata
Metadata
Assignees
Labels
No labels