diff --git a/lib/Elastica/Aggregation/AbstractAggregation.php b/lib/Elastica/Aggregation/AbstractAggregation.php index 5d9c43a467..c80fc589ad 100644 --- a/lib/Elastica/Aggregation/AbstractAggregation.php +++ b/lib/Elastica/Aggregation/AbstractAggregation.php @@ -132,7 +132,7 @@ public function toArray(): array // compensate for class name GlobalAggregation $array = ['global' => new \stdClass()]; } - if (\sizeof($this->_aggs)) { + if (\count($this->_aggs)) { $array['aggs'] = $this->_convertArrayable($this->_aggs); } diff --git a/lib/Elastica/ResultSet.php b/lib/Elastica/ResultSet.php index af66de11e4..c67ed4edcb 100644 --- a/lib/Elastica/ResultSet.php +++ b/lib/Elastica/ResultSet.php @@ -241,7 +241,7 @@ public function count() */ public function countSuggests() { - return \sizeof($this->getSuggests()); + return \count($this->getSuggests()); } /**