Skip to content

Commit

Permalink
CS Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
norberttech committed Feb 2, 2024
1 parent 9f1a40f commit c2d939d
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ public function extract(FlowContext $context) : \Generator
$total = $this->maximum;
} else {
$countQuery = (clone $this->queryBuilder)->select('COUNT(*)');
$countQuery->resetQueryPart('orderBy');

if (\method_exists($countQuery, 'resetOrderBy')) {
$countQuery->resetOrderBy();
} else {
/** @psalm-suppress DeprecatedMethod */
$countQuery->resetQueryPart('orderBy');
}

$total = (int) $this->connection->fetchOne(
$countQuery->getSQL(),
Expand Down

0 comments on commit c2d939d

Please sign in to comment.