Total Complexity | 4 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
7 | class Questions implements Collection |
||
8 | { |
||
9 | /** |
||
10 | * @var Question[] |
||
11 | */ |
||
12 | private $questions; |
||
13 | |||
14 | /** |
||
15 | * Questions constructor. |
||
16 | * @param Question ...$questions |
||
17 | */ |
||
18 | public function __construct(Question ...$questions) |
||
19 | { |
||
20 | $this->questions = $questions; |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * @inheritdoc |
||
25 | */ |
||
26 | public function getIterator(): \ArrayIterator |
||
27 | { |
||
28 | return new \ArrayIterator($this->questions); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @inheritdoc |
||
33 | */ |
||
34 | public function count(): int |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @return Question[] |
||
41 | */ |
||
42 | public function toArray(): array |
||
47 |