Skip to content

Unused variable #2

Open
Open
@jasekiw

Description

@jasekiw

It doesn't seem like the $wheres variable is used at all. What is it's purpose?

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions