Skip to content

Commit

Permalink
Fix phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
W0rma committed Apr 22, 2024
1 parent 8889a69 commit da94161
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
parameters:
ignoreErrors:
-
message: "#^Call to an undefined method Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder\\:\\:resetQueryParts\\(\\)\\.$#"
count: 1
path: src/Knp/Component/Pager/Event/Subscriber/Paginate/Doctrine/DBALQueryBuilderSubscriber.php

-
message: "#^Method Knp\\\\Component\\\\Pager\\\\Event\\\\Subscriber\\\\Sortable\\\\ArraySubscriber\\:\\:sortFunction\\(\\) has parameter \\$object1 with no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -29,4 +34,3 @@ parameters:
message: "#^Interface Knp\\\\Component\\\\Pager\\\\Pagination\\\\PaginationInterface extends generic interface ArrayAccess but does not specify its types\\: TKey, TValue$#"
count: 1
path: src/Knp/Component/Pager/Pagination/PaginationInterface.php

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function items(ItemsEvent $event): void
}

$queryCount = clone $event->target;
$event->count = $queryCount->execute(null, Query::HYDRATE_PHPCR)->getRows()->count();
$event->count = iterator_count($queryCount->execute(null, Query::HYDRATE_PHPCR)->getRows());

$query = $event->target;
$query->setMaxResults($event->getLimit());
Expand Down

0 comments on commit da94161

Please sign in to comment.