Total Complexity | 8 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
9 | final class FailedMessageCollection implements Countable, Iterator |
||
10 | { |
||
11 | /** |
||
12 | * @var array |
||
13 | */ |
||
14 | private $failedMessages = []; |
||
15 | |||
16 | /** |
||
17 | * @var int |
||
18 | */ |
||
19 | private $pointer = 0; |
||
20 | |||
21 | public function __construct(array $failedMessagesArray) |
||
29 | } |
||
30 | } |
||
31 | |||
32 | public function current(): FailedMessage |
||
33 | { |
||
34 | return $this->failedMessages[$this->pointer]; |
||
35 | } |
||
36 | |||
37 | public function next(): void |
||
38 | { |
||
39 | $this->pointer++; |
||
40 | } |
||
41 | |||
42 | public function key(): int |
||
45 | } |
||
46 | |||
47 | public function valid(): bool |
||
48 | { |
||
49 | return isset($this->failedMessages[$this->pointer]); |
||
50 | } |
||
51 | |||
52 | public function rewind(): void |
||
53 | { |
||
54 | $this->pointer = 0; |
||
55 | } |
||
56 | |||
57 | public function count(): int |
||
60 | } |
||
61 | } |
||
62 |