We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 034c32f commit e03dbaaCopy full SHA for e03dbaa
1 file changed
src/Response/Result/HitCollection.php
@@ -3,7 +3,7 @@
3
namespace Spameri\ElasticQuery\Response\Result;
4
5
6
-class HitCollection implements \IteratorAggregate
+class HitCollection implements \IteratorAggregate, \Countable
7
{
8
9
/**
@@ -25,4 +25,10 @@ public function getIterator(): \ArrayIterator
25
return new \ArrayIterator($this->hits);
26
}
27
28
+
29
+ public function count(): int
30
+ {
31
+ return \count($this->hits);
32
+ }
33
34
0 commit comments