Skip to content

Commit 1cc187d

Browse files
committed
remove useless line
1 parent 3dde14a commit 1cc187d

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

src/Doctrine/Odm/Filter/OrderFilter.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,13 @@ final class OrderFilter extends AbstractFilter implements OrderFilterInterface,
205205
use OrderFilterTrait;
206206
use PropertyPlaceholderOpenApiParameterTrait;
207207

208-
public function __construct(?ManagerRegistry $managerRegistry = null, string $orderParameterName = 'order', ?LoggerInterface $logger = null, ?array $properties = null, ?NameConverterInterface $nameConverter = null)
209-
{
208+
public function __construct(
209+
?ManagerRegistry $managerRegistry = null,
210+
string $orderParameterName = 'order',
211+
?LoggerInterface $logger = null,
212+
?array $properties = null,
213+
?NameConverterInterface $nameConverter = null
214+
) {
210215
if (null !== $properties) {
211216
$properties = array_map(static function ($propertyOptions) {
212217
// shorthand for default direction
@@ -233,7 +238,6 @@ public function apply(Builder $aggregationBuilder, string $resourceClass, ?Opera
233238
if (
234239
isset($context['filters'])
235240
&& (!isset($context['filters'][$this->orderParameterName]) || !\is_array($context['filters'][$this->orderParameterName]))
236-
&& !isset($context['parameter'])
237241
) {
238242
return;
239243
}

src/Doctrine/Orm/Filter/OrderFilter.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,14 @@ final class OrderFilter extends AbstractFilter implements OrderFilterInterface,
204204
use OrderFilterTrait;
205205
use PropertyPlaceholderOpenApiParameterTrait;
206206

207-
public function __construct(?ManagerRegistry $managerRegistry = null, string $orderParameterName = 'order', ?LoggerInterface $logger = null, ?array $properties = null, ?NameConverterInterface $nameConverter = null, private readonly ?string $orderNullsComparison = null)
208-
{
207+
public function __construct(
208+
?ManagerRegistry $managerRegistry = null,
209+
string $orderParameterName = 'order',
210+
?LoggerInterface $logger = null,
211+
?array $properties = null,
212+
?NameConverterInterface $nameConverter = null,
213+
private readonly ?string $orderNullsComparison = null
214+
) {
209215
if (null !== $properties) {
210216
$properties = array_map(static function ($propertyOptions) {
211217
// shorthand for default direction
@@ -232,7 +238,6 @@ public function apply(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $q
232238
if (
233239
isset($context['filters'])
234240
&& (!isset($context['filters'][$this->orderParameterName]) || !\is_array($context['filters'][$this->orderParameterName]))
235-
&& !isset($context['parameter'])
236241
) {
237242
return;
238243
}

0 commit comments

Comments
 (0)