Loading src/Filter/Range.php +2 −2 Original line number Diff line number Diff line Loading @@ -20,13 +20,13 @@ final class Range extends HttpFilter if (isset($this->getHttpValue()['min'])) { $queryBuilder->where( $this->getColumn() . ' >= ' . $this->getHttpValue()['min'] $this->getColumn() . ' >= ' . $this->getHttpValue()['min'], ); } if (isset($this->getHttpValue()['max'])) { $queryBuilder->andWhere( $this->getColumn() . ' <= ' . $this->getHttpValue()['max'] $this->getColumn() . ' <= ' . $this->getHttpValue()['max'], ); } Loading tests/FilterByDateRangeTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ class FilterByDateRangeTest extends TestCase HttpFilter::REQUEST_FILTER_KEY => [ 'createdAt' => [ 'from' => $firstDate->add(new DateInterval('P1Y'))->format('Y-m-d'), 'to' => $secondDate->add(new DateInterval('P1Y'))->format('Y-m-d') 'to' => $secondDate->add(new DateInterval('P1Y'))->format('Y-m-d'), ], ], ])) Loading Loading @@ -231,7 +231,7 @@ class FilterByDateRangeTest extends TestCase HttpFilter::REQUEST_FILTER_KEY => [ 'createdAt' => [ 'from' => 'not date', 'to' => 'not date' 'to' => 'not date', ], ], ])) Loading @@ -252,7 +252,7 @@ class FilterByDateRangeTest extends TestCase 'createdAt' => DateRange::class, ], new Request([ HttpFilter::REQUEST_FILTER_KEY => [ 'notCreatedAt' => 'Not createdAt value' 'notCreatedAt' => 'Not createdAt value', ], ])) ->getQuery() Loading tests/FilterByDateTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -178,7 +178,7 @@ class FilterByDateTest extends TestCase 'createdAt' => Date::class, ], new Request([ HttpFilter::REQUEST_FILTER_KEY => [ 'notCreatedAt' => 'Not createdAt value' 'notCreatedAt' => 'Not createdAt value', ], ])) ->getQuery() Loading tests/FilterByInTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -173,7 +173,7 @@ class FilterByInTest extends TestCase 'title' => In::class, ], new Request([ HttpFilter::REQUEST_FILTER_KEY => [ 'notTitle' => 'Not title value' 'notTitle' => 'Not title value', ], ])) ->getQuery() Loading tests/FilterByLikeTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -155,7 +155,7 @@ class FilterByLikeTest extends TestCase 'title' => Like::class, ], new Request([ HttpFilter::REQUEST_FILTER_KEY => [ 'notTitle' => 'Not title value' 'notTitle' => 'Not title value', ], ])) ->getQuery() Loading Loading
src/Filter/Range.php +2 −2 Original line number Diff line number Diff line Loading @@ -20,13 +20,13 @@ final class Range extends HttpFilter if (isset($this->getHttpValue()['min'])) { $queryBuilder->where( $this->getColumn() . ' >= ' . $this->getHttpValue()['min'] $this->getColumn() . ' >= ' . $this->getHttpValue()['min'], ); } if (isset($this->getHttpValue()['max'])) { $queryBuilder->andWhere( $this->getColumn() . ' <= ' . $this->getHttpValue()['max'] $this->getColumn() . ' <= ' . $this->getHttpValue()['max'], ); } Loading
tests/FilterByDateRangeTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ class FilterByDateRangeTest extends TestCase HttpFilter::REQUEST_FILTER_KEY => [ 'createdAt' => [ 'from' => $firstDate->add(new DateInterval('P1Y'))->format('Y-m-d'), 'to' => $secondDate->add(new DateInterval('P1Y'))->format('Y-m-d') 'to' => $secondDate->add(new DateInterval('P1Y'))->format('Y-m-d'), ], ], ])) Loading Loading @@ -231,7 +231,7 @@ class FilterByDateRangeTest extends TestCase HttpFilter::REQUEST_FILTER_KEY => [ 'createdAt' => [ 'from' => 'not date', 'to' => 'not date' 'to' => 'not date', ], ], ])) Loading @@ -252,7 +252,7 @@ class FilterByDateRangeTest extends TestCase 'createdAt' => DateRange::class, ], new Request([ HttpFilter::REQUEST_FILTER_KEY => [ 'notCreatedAt' => 'Not createdAt value' 'notCreatedAt' => 'Not createdAt value', ], ])) ->getQuery() Loading
tests/FilterByDateTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -178,7 +178,7 @@ class FilterByDateTest extends TestCase 'createdAt' => Date::class, ], new Request([ HttpFilter::REQUEST_FILTER_KEY => [ 'notCreatedAt' => 'Not createdAt value' 'notCreatedAt' => 'Not createdAt value', ], ])) ->getQuery() Loading
tests/FilterByInTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -173,7 +173,7 @@ class FilterByInTest extends TestCase 'title' => In::class, ], new Request([ HttpFilter::REQUEST_FILTER_KEY => [ 'notTitle' => 'Not title value' 'notTitle' => 'Not title value', ], ])) ->getQuery() Loading
tests/FilterByLikeTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -155,7 +155,7 @@ class FilterByLikeTest extends TestCase 'title' => Like::class, ], new Request([ HttpFilter::REQUEST_FILTER_KEY => [ 'notTitle' => 'Not title value' 'notTitle' => 'Not title value', ], ])) ->getQuery() Loading