From 0564d62b76ad46e8bb9edd632ff0f105c1b81ec5 Mon Sep 17 00:00:00 2001 From: clementvtrd <84911237+clementvtrd@users.noreply.github.com> Date: Fri, 8 Mar 2024 16:13:52 +0100 Subject: [PATCH] fix: order by walker signature Co-authored-by: muchafm <47305202+muchafm@users.noreply.github.com> --- phpstan-baseline.neon | 7 ------- phpstan.neon | 2 -- .../Sortable/Doctrine/ORM/Query/OrderByWalker.php | 4 +--- 3 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 phpstan-baseline.neon diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon deleted file mode 100644 index 6d95c99f..00000000 --- a/phpstan-baseline.neon +++ /dev/null @@ -1,7 +0,0 @@ -parameters: - ignoreErrors: - - - message: "#^Instanceof between Doctrine\\\\ORM\\\\Query\\\\AST\\\\ConditionalExpression and Doctrine\\\\ORM\\\\Query\\\\AST\\\\ConditionalPrimary will always evaluate to false\\.$#" - count: 1 - path: src/Knp/Component/Pager/Event/Subscriber/Filtration/Doctrine/ORM/Query/WhereWalker.php - diff --git a/phpstan.neon b/phpstan.neon index 3f2c8766..91e64530 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -2,5 +2,3 @@ parameters: level: 5 paths: - src -includes: - - phpstan-baseline.neon diff --git a/src/Knp/Component/Pager/Event/Subscriber/Sortable/Doctrine/ORM/Query/OrderByWalker.php b/src/Knp/Component/Pager/Event/Subscriber/Sortable/Doctrine/ORM/Query/OrderByWalker.php index a0e06f61..e8508090 100644 --- a/src/Knp/Component/Pager/Event/Subscriber/Sortable/Doctrine/ORM/Query/OrderByWalker.php +++ b/src/Knp/Component/Pager/Event/Subscriber/Sortable/Doctrine/ORM/Query/OrderByWalker.php @@ -34,7 +34,7 @@ class OrderByWalker extends TreeWalkerAdapter * Walks down a SelectStatement AST node, modifying it to * sort the query like requested by url */ - public function walkSelectStatement(SelectStatement $AST): string + public function walkSelectStatement(SelectStatement $AST): void { $query = $this->_getQuery(); $fields = (array)$query->getHint(self::HINT_PAGINATOR_SORT_FIELD); @@ -90,7 +90,5 @@ public function walkSelectStatement(SelectStatement $AST): string $AST->orderByClause = new OrderByClause([$orderByItem]); } } - - return ''; } }