1 | <?php |
||
2 | /** |
||
3 | * |
||
4 | */ |
||
5 | |||
6 | namespace Mvc5\Config; |
||
7 | |||
8 | trait Iterator |
||
9 | { |
||
10 | /** |
||
11 | * @var Model |
||
12 | */ |
||
13 | protected Model $config; |
||
14 | |||
15 | /** |
||
16 | * @return mixed |
||
17 | */ |
||
18 | 53 | function current() |
|
19 | { |
||
20 | 53 | return $this->config->current(); |
|
21 | } |
||
22 | |||
23 | /** |
||
24 | * @return int|string|null |
||
25 | */ |
||
26 | 9 | function key() |
|
27 | { |
||
28 | 9 | return $this->config->key(); |
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
29 | } |
||
30 | |||
31 | /** |
||
32 | * |
||
33 | */ |
||
34 | 39 | function next() : void |
|
35 | { |
||
36 | 39 | $this->config->next(); |
|
37 | 39 | } |
|
38 | |||
39 | /** |
||
40 | * |
||
41 | */ |
||
42 | 43 | function rewind() : void |
|
43 | { |
||
44 | 43 | $this->config->rewind(); |
|
45 | 43 | } |
|
46 | |||
47 | /** |
||
48 | * @return bool |
||
49 | */ |
||
50 | 31 | function valid() : bool |
|
51 | { |
||
52 | 31 | return $this->config->valid(); |
|
53 | } |
||
54 | } |
||
55 |