@@ -93,6 +93,7 @@ public function getForm()
9393 *
9494 * @return FormError|self An error or an iterator containing nested errors
9595 */
96+ #[\ReturnTypeWillChange]
9697 public function current ()
9798 {
9899 return current ($ this ->errors );
@@ -101,6 +102,7 @@ public function current()
101102 /**
102103 * Advances the iterator to the next position.
103104 */
105+ #[\ReturnTypeWillChange]
104106 public function next ()
105107 {
106108 next ($ this ->errors );
@@ -111,6 +113,7 @@ public function next()
111113 *
112114 * @return int The 0-indexed position
113115 */
116+ #[\ReturnTypeWillChange]
114117 public function key ()
115118 {
116119 return key ($ this ->errors );
@@ -121,6 +124,7 @@ public function key()
121124 *
122125 * @return bool Whether the iterator is valid
123126 */
127+ #[\ReturnTypeWillChange]
124128 public function valid ()
125129 {
126130 return null !== key ($ this ->errors );
@@ -132,6 +136,7 @@ public function valid()
132136 * This method detects if errors have been added to the form since the
133137 * construction of the iterator.
134138 */
139+ #[\ReturnTypeWillChange]
135140 public function rewind ()
136141 {
137142 reset ($ this ->errors );
@@ -144,6 +149,7 @@ public function rewind()
144149 *
145150 * @return bool Whether that position exists
146151 */
152+ #[\ReturnTypeWillChange]
147153 public function offsetExists ($ position )
148154 {
149155 return isset ($ this ->errors [$ position ]);
@@ -158,6 +164,7 @@ public function offsetExists($position)
158164 *
159165 * @throws OutOfBoundsException If the given position does not exist
160166 */
167+ #[\ReturnTypeWillChange]
161168 public function offsetGet ($ position )
162169 {
163170 if (!isset ($ this ->errors [$ position ])) {
@@ -174,6 +181,7 @@ public function offsetGet($position)
174181 *
175182 * @throws BadMethodCallException
176183 */
184+ #[\ReturnTypeWillChange]
177185 public function offsetSet ($ position , $ value )
178186 {
179187 throw new BadMethodCallException ('The iterator doesn \'t support modification of elements. ' );
@@ -186,6 +194,7 @@ public function offsetSet($position, $value)
186194 *
187195 * @throws BadMethodCallException
188196 */
197+ #[\ReturnTypeWillChange]
189198 public function offsetUnset ($ position )
190199 {
191200 throw new BadMethodCallException ('The iterator doesn \'t support modification of elements. ' );
@@ -197,6 +206,7 @@ public function offsetUnset($position)
197206 *
198207 * @return bool Whether the current element is an instance of this class
199208 */
209+ #[\ReturnTypeWillChange]
200210 public function hasChildren ()
201211 {
202212 return current ($ this ->errors ) instanceof self;
@@ -207,6 +217,7 @@ public function hasChildren()
207217 *
208218 * @return self
209219 */
220+ #[\ReturnTypeWillChange]
210221 public function getChildren ()
211222 {
212223 return current ($ this ->errors );
@@ -229,6 +240,7 @@ public function getChildren()
229240 *
230241 * @return int The number of iterated elements
231242 */
243+ #[\ReturnTypeWillChange]
232244 public function count ()
233245 {
234246 return \count ($ this ->errors );
@@ -243,6 +255,7 @@ public function count()
243255 *
244256 * @throws OutOfBoundsException If the position is invalid
245257 */
258+ #[\ReturnTypeWillChange]
246259 public function seek ($ position )
247260 {
248261 if (!isset ($ this ->errors [$ position ])) {
0 commit comments