Skip to content

Commit

Permalink
fix CountAggregator implementation for Array
Browse files Browse the repository at this point in the history
  • Loading branch information
hrach committed Mar 14, 2024
1 parent aabcd5a commit cc4142f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Collection/Aggregations/CountAggregator.php
Expand Up @@ -43,9 +43,9 @@ public function getAggregateKey(): string
public function aggregateValues(array $values): bool
{
$count = count(array_filter($values));
if ($this->atLeast !== null && $count >= $this->atLeast) return true;
if ($this->atMost !== null && $count <= $this->atMost) return true;
return false;
if ($this->atLeast !== null && $count < $this->atLeast) return false;
if ($this->atMost !== null && $count > $this->atMost) return false;
return true;
}


Expand Down

0 comments on commit cc4142f

Please sign in to comment.