From 5defc7fe70283b14f708c53860094c58e12788c3 Mon Sep 17 00:00:00 2001 From: Mehdi Fathi Date: Sun, 20 Oct 2019 11:58:48 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/QueryFilter/Queries/QueryBuilder.php | 2 -- tests/Tests/UserFilterTest.php | 1 - 2 files changed, 3 deletions(-) diff --git a/src/QueryFilter/Queries/QueryBuilder.php b/src/QueryFilter/Queries/QueryBuilder.php index a3713fd9..2aa819c3 100644 --- a/src/QueryFilter/Queries/QueryBuilder.php +++ b/src/QueryFilter/Queries/QueryBuilder.php @@ -48,7 +48,6 @@ public function __construct(Builder $builder) */ public function buildQuery($field, array $params) { - if (!empty($params[0]['start']) && !empty($params[0]['end'])) { $this->queryFilterBuilder->whereBetween($field, $params); } elseif ($field == 'f_params') { @@ -71,7 +70,6 @@ public function buildQuery($field, array $params) private function __buildQueryWithNewParams($field, array $params) { foreach ($params as $key => $param) { - if (!in_array($key, $this->reserve_param['f_params'])) { throw new \Exception("$key is not in f_params array."); } diff --git a/tests/Tests/UserFilterTest.php b/tests/Tests/UserFilterTest.php index 01464330..54d37cef 100644 --- a/tests/Tests/UserFilterTest.php +++ b/tests/Tests/UserFilterTest.php @@ -360,7 +360,6 @@ public function itCanOrderByIdLimitListUsername() 'username' => 'ahmad', ])->orderBy('id', 'ASC')->limit(1)->get(); - $this->assertEquals($users_pure, $users); }