Skip to content
Snippets Groups Projects
Commit 2f1bf981 authored by Адлан Шамавов's avatar Адлан Шамавов
Browse files

style: Исправление стилей

parent b1aab20b
No related branches found
No related tags found
1 merge request!1Фильтры Like, ILike, Range, In, Date, DateRange
......@@ -19,7 +19,7 @@ final class DateRange extends HttpFilter
if (isset($this->getHttpValue()['from'])) {
$queryBuilder->where(
'strftime(\'%Y-%m-%d\', ' . $this->getColumn() . ') >= \'' . $this->getHttpValue()['from'] . '\'',
'strftime(\'%Y-%m-%d\', ' . $this->getColumn() . ') >= \'' . $this->getHttpValue()['from'] . '\'',
);
}
......
......@@ -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'],
);
}
......
......@@ -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'),
],
],
]))
......@@ -231,7 +231,7 @@ class FilterByDateRangeTest extends TestCase
HttpFilter::REQUEST_FILTER_KEY => [
'createdAt' => [
'from' => 'not date',
'to' => 'not date'
'to' => 'not date',
],
],
]))
......@@ -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()
......
......@@ -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()
......
......@@ -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()
......
......@@ -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()
......
......@@ -257,7 +257,7 @@ class FilterByRangeTest extends TestCase
'countOfViews' => Range::class,
], new Request([
HttpFilter::REQUEST_FILTER_KEY => [
'notCountOfViews' => 'Not countOfViews value'
'notCountOfViews' => 'Not countOfViews value',
],
]))
->getQuery()
......
......@@ -139,7 +139,7 @@ class FilterByWhereTest extends TestCase
'title' => Where::class,
], new Request([
HttpFilter::REQUEST_FILTER_KEY => [
'notTitle' => 'Not title value'
'notTitle' => 'Not title value',
],
]))
->getQuery()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment