| Total Complexity | 4 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Term implements \IteratorAggregate, \Countable |
||
| 6 | { |
||
| 7 | |||
| 8 | /** |
||
| 9 | * @var int |
||
| 10 | */ |
||
| 11 | private $numFound; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var array |
||
| 15 | */ |
||
| 16 | private $suggestions; |
||
| 17 | |||
| 18 | public function __construct($numFound, $suggestions) |
||
| 22 | } |
||
| 23 | |||
| 24 | |||
| 25 | /** |
||
| 26 | * IteratorAggregate implementation |
||
| 27 | * |
||
| 28 | * @return \ArrayIterator |
||
| 29 | */ |
||
| 30 | public function getIterator() |
||
| 31 | { |
||
| 32 | return new \ArrayIterator($this->suggestions); |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Countable implementation |
||
| 37 | * |
||
| 38 | * @return int |
||
| 39 | */ |
||
| 40 | public function count() |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Get suggestions |
||
| 47 | * |
||
| 48 | * @return array |
||
| 49 | */ |
||
| 50 | public function getSuggestions() |
||
| 53 | } |
||
| 54 | |||
| 55 | } |