Skip to content

Commit

Permalink
Remove unnecessary orWheres (#6460)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell authored Aug 8, 2022
1 parent 6123274 commit cde74d2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
10 changes: 0 additions & 10 deletions src/Stache/Query/EntryQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ public function where($column, $operator = null, $value = null, $boolean = 'and'
return parent::where($column, $operator, $value, $boolean);
}

public function orWhere($column, $operator = null, $value = null)
{
return $this->where($column, $operator, $value, 'or');
}

public function whereIn($column, $values, $boolean = 'and')
{
if (in_array($column, ['collection', 'collections'])) {
Expand All @@ -39,11 +34,6 @@ public function whereIn($column, $values, $boolean = 'and')
return parent::whereIn($column, $values, $boolean);
}

public function orWhereIn($column, $values)
{
return $this->whereIn($column, $values, 'or');
}

protected function collect($items = [])
{
return EntryCollection::make($items);
Expand Down
10 changes: 0 additions & 10 deletions src/Stache/Query/TermQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ public function where($column, $operator = null, $value = null, $boolean = 'and'
return parent::where($column, $operator, $value, $boolean);
}

public function orWhere($column, $operator = null, $value = null)
{
return $this->where($column, $operator, $value, 'or');
}

public function whereIn($column, $values, $boolean = 'and')
{
if (in_array($column, ['taxonomy', 'taxonomies'])) {
Expand All @@ -50,11 +45,6 @@ public function whereIn($column, $values, $boolean = 'and')
return parent::whereIn($column, $values, $boolean);
}

public function orWhereIn($column, $values)
{
return $this->whereIn($column, $values, 'or');
}

protected function collect($items = [])
{
return TermCollection::make($items);
Expand Down

0 comments on commit cde74d2

Please sign in to comment.