Skip to content

Commit

Permalink
properly fix phpstan error due to wrong return type in doctrine pagin…
Browse files Browse the repository at this point in the history
…ator
  • Loading branch information
kohlerdominik committed Dec 11, 2024
1 parent 7f16489 commit e5cea93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Pagination/DoctrinePaginatorAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ public function getTotal(): int
*/
public function getCount(): int
{
return $this->paginator->count();
// @phpstan-ignore method.notFound
return $this->paginator->getIterator()->count();

Check failure on line 77 in src/Pagination/DoctrinePaginatorAdapter.php

View workflow job for this annotation

GitHub Actions / PHPStan

Call to an undefined method Traversable<(int|string), mixed>::count().

Check failure on line 77 in src/Pagination/DoctrinePaginatorAdapter.php

View workflow job for this annotation

GitHub Actions / Psalm

UndefinedInterfaceMethod

src/Pagination/DoctrinePaginatorAdapter.php:77:49: UndefinedInterfaceMethod: Method Traversable::count does not exist (see https://psalm.dev/181)
}

/**
Expand Down

0 comments on commit e5cea93

Please sign in to comment.