Skip to content

Commit

Permalink
Use whereInList() and whereNotInList().
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Mar 15, 2018
1 parent 9a1e49e commit 81edbac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Database/Query.php
Expand Up @@ -906,7 +906,7 @@ public function where($conditions = null, $types = [], $overwrite = false)
* @param array $options Options
* @return $this
*/
public function whereInArray($field, array $values, array $options = [])
public function whereInList($field, array $values, array $options = [])
{
$options += [
'types' => [],
Expand All @@ -933,7 +933,7 @@ public function whereInArray($field, array $values, array $options = [])
* @param array $options Options
* @return $this
*/
public function whereNotInArray($field, array $values, array $options = [])
public function whereNotInList($field, array $values, array $options = [])
{
$options += [
'types' => [],
Expand Down
8 changes: 4 additions & 4 deletions tests/TestCase/Database/QueryTest.php
Expand Up @@ -1724,7 +1724,7 @@ public function testWhereInArray()
$query = new Query($this->connection);
$query->select(['id'])
->from('articles')
->whereInArray('id', [2, 3])
->whereInList('id', [2, 3])
->execute();
$sql = $query->sql();

Expand All @@ -1749,7 +1749,7 @@ public function testWhereInArrayEmpty()
$query = new Query($this->connection);
$query->select(['id'])
->from('articles')
->whereInArray('id', [], ['allowEmpty' => true])
->whereInList('id', [], ['allowEmpty' => true])
->execute();
$sql = $query->sql();

Expand All @@ -1774,7 +1774,7 @@ public function testWhereNotInArray()
$query = new Query($this->connection);
$query->select(['id'])
->from('articles')
->whereNotInArray('id', [1, 3])
->whereNotInList('id', [1, 3])
->execute();
$sql = $query->sql();

Expand All @@ -1799,7 +1799,7 @@ public function testWhereNotInArrayEmpty()
$query = new Query($this->connection);
$query->select(['id'])
->from('articles')
->whereNotInArray('id', [], ['allowEmpty' => true])
->whereNotInList('id', [], ['allowEmpty' => true])
->execute();
$sql = $query->sql();

Expand Down

0 comments on commit 81edbac

Please sign in to comment.