1 | <?php |
||
19 | class StringStream |
||
20 | { |
||
21 | /** |
||
22 | * StringStream constructor. |
||
23 | * @param string $string |
||
24 | * @throws \BadMethodCallException |
||
25 | * @throws \Hoa\Ustring\Exception |
||
26 | */ |
||
27 | public function __construct(string $string) |
||
37 | |||
38 | /** |
||
39 | * Current char of stream |
||
40 | * @return string |
||
41 | */ |
||
42 | public function current() : string |
||
46 | |||
47 | /** |
||
48 | * @return int |
||
49 | */ |
||
50 | public function ord() : int |
||
54 | |||
55 | /** |
||
56 | * Current char of stream as AsciiChar |
||
57 | * @return AsciiChar |
||
58 | * @throws \LogicException |
||
59 | * @throws \InvalidArgumentException |
||
60 | */ |
||
61 | public function currentAscii() : AsciiChar |
||
65 | |||
66 | /** |
||
67 | * Position in stream of current char |
||
68 | * @return int |
||
69 | */ |
||
70 | public function position() : int |
||
74 | |||
75 | /** |
||
76 | * go to next char in stream |
||
77 | */ |
||
78 | public function next() |
||
83 | |||
84 | /** |
||
85 | * go to previous char of stream |
||
86 | */ |
||
87 | public function previous() |
||
92 | |||
93 | /** |
||
94 | * go to start of stream |
||
95 | */ |
||
96 | public function start() |
||
100 | |||
101 | /** |
||
102 | * is start of stream |
||
103 | * @return bool |
||
104 | */ |
||
105 | public function isStart() : bool |
||
109 | |||
110 | /** |
||
111 | * go to end of stream |
||
112 | */ |
||
113 | public function end() |
||
117 | |||
118 | /** |
||
119 | * is end of stream |
||
120 | * @return bool |
||
121 | */ |
||
122 | public function isEnd() : bool |
||
126 | |||
127 | /** |
||
128 | * ignore chars in stream while it is white space |
||
129 | * @throws \InvalidArgumentException |
||
130 | * @throws \LogicException |
||
131 | */ |
||
132 | public function ignoreWhitespace() |
||
140 | |||
141 | /** |
||
142 | * ignore chars in stream while it is horizontal space |
||
143 | * @throws \LogicException |
||
144 | * @throws \InvalidArgumentException |
||
145 | */ |
||
146 | public function ignoreHorizontalSpace() |
||
154 | |||
155 | /** |
||
156 | * ignore chars in stream while it is vertical space |
||
157 | * @throws \InvalidArgumentException |
||
158 | * @throws \LogicException |
||
159 | */ |
||
160 | public function ignoreVerticalSpace() |
||
168 | |||
169 | /** |
||
170 | * @var array |
||
171 | */ |
||
172 | private $stream; |
||
173 | |||
174 | /** |
||
175 | * if next returns false it member will be true, else false |
||
176 | * @var bool |
||
177 | */ |
||
178 | private $pointerAtEnd; |
||
179 | |||
180 | /** |
||
181 | * if prev returns false it member will be true, else false |
||
182 | * @var bool |
||
183 | */ |
||
184 | private $pointerAtStart; |
||
185 | } |
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..