1 | <?php |
||
25 | abstract class Abstraction implements Reader |
||
26 | { |
||
27 | /** |
||
28 | * Internal iterator to handle foreach |
||
29 | * |
||
30 | * @var \Iterator |
||
31 | */ |
||
32 | private $iterator; |
||
33 | |||
34 | /** |
||
35 | * Return the internal iterator |
||
36 | * |
||
37 | * @return \Iterator |
||
38 | */ |
||
39 | private function getIterator(): Iterator |
||
43 | |||
44 | /** |
||
45 | * Set the pointer to the next line |
||
46 | * |
||
47 | * @return void |
||
48 | */ |
||
49 | public function next(): void |
||
53 | |||
54 | /** |
||
55 | * Get the line number of the current line |
||
56 | * |
||
57 | * @return int |
||
58 | */ |
||
59 | public function key(): int |
||
63 | |||
64 | /** |
||
65 | * Check whether the current line is valid |
||
66 | * |
||
67 | * @return bool |
||
68 | */ |
||
69 | public function valid(): bool |
||
73 | |||
74 | /** |
||
75 | * Recreate/rewind the iterator |
||
76 | * |
||
77 | * @return void |
||
78 | */ |
||
79 | public function rewind(): void |
||
83 | |||
84 | /** |
||
85 | * Get the current line |
||
86 | * |
||
87 | * @return string |
||
88 | */ |
||
89 | public function current(): string |
||
93 | |||
94 | /** |
||
95 | * Create the internal iterator |
||
96 | * |
||
97 | * @return iterable |
||
98 | */ |
||
99 | protected abstract function createIterator(): iterable; |
||
100 | } |
||
101 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..