From 81edbac8898fdce093991f683970f98aa33a70c1 Mon Sep 17 00:00:00 2001 From: mscherer Date: Thu, 15 Mar 2018 14:01:33 +0100 Subject: [PATCH] Use whereInList() and whereNotInList(). --- src/Database/Query.php | 4 ++-- tests/TestCase/Database/QueryTest.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Database/Query.php b/src/Database/Query.php index f4c0ba2db7b..bab1c76a534 100644 --- a/src/Database/Query.php +++ b/src/Database/Query.php @@ -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' => [], @@ -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' => [], diff --git a/tests/TestCase/Database/QueryTest.php b/tests/TestCase/Database/QueryTest.php index 4f68eef3847..56b21b6fc0c 100644 --- a/tests/TestCase/Database/QueryTest.php +++ b/tests/TestCase/Database/QueryTest.php @@ -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(); @@ -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(); @@ -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(); @@ -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();