@@ -67,18 +67,19 @@ public function addChild(FormTreeNode $node)
6767
6868 /**
6969 * Set the loop back to the start
70+ *
71+ * @return void
7072 */
73+ #[\ReturnTypeWillChange]
7174 public function rewind ()
7275 {
7376 $ this ->position = 0 ;
7477 }
7578
7679 /**
7780 * Return the length of the tree
78- *
79- * @return int
8081 */
81- public function count ()
82+ public function count (): int
8283 {
8384 return \count ($ this ->nodes );
8485 }
@@ -88,6 +89,7 @@ public function count()
8889 *
8990 * @return FormTreeNode
9091 */
92+ #[\ReturnTypeWillChange]
9193 public function current ()
9294 {
9395 return $ this ->nodes [$ this ->position ];
@@ -98,14 +100,18 @@ public function current()
98100 *
99101 * @return int
100102 */
103+ #[\ReturnTypeWillChange]
101104 public function key ()
102105 {
103106 return $ this ->position ;
104107 }
105108
106109 /**
107110 * Increment current position
111+ *
112+ * @return void
108113 */
114+ #[\ReturnTypeWillChange]
109115 public function next ()
110116 {
111117 ++$ this ->position ;
@@ -116,6 +122,7 @@ public function next()
116122 *
117123 * @return int
118124 */
125+ #[\ReturnTypeWillChange]
119126 public function valid ()
120127 {
121128 return $ this ->offsetExists ($ this ->position );
@@ -128,6 +135,7 @@ public function valid()
128135 *
129136 * @return bool
130137 */
138+ #[\ReturnTypeWillChange]
131139 public function offsetExists ($ offset )
132140 {
133141 return isset ($ this ->nodes [$ offset ]);
@@ -140,6 +148,7 @@ public function offsetExists($offset)
140148 *
141149 * @return FormTreeNode
142150 */
151+ #[\ReturnTypeWillChange]
143152 public function offsetGet ($ offset )
144153 {
145154 return $ this ->offsetExists ($ offset ) ? $ this ->nodes [$ offset ] : null ;
@@ -150,7 +159,10 @@ public function offsetGet($offset)
150159 *
151160 * @param mixed $offset
152161 * @param mixed $value
162+ *
163+ * @return void
153164 */
165+ #[\ReturnTypeWillChange]
154166 public function offsetSet ($ offset , $ value )
155167 {
156168 /* Not implemented: Use addParent and addChild methods */
@@ -160,7 +172,10 @@ public function offsetSet($offset, $value)
160172 * Unset node at the given offset
161173 *
162174 * @param mixed $offset
175+ *
176+ * @return void
163177 */
178+ #[\ReturnTypeWillChange]
164179 public function offsetUnset ($ offset )
165180 {
166181 /* Not implemented: FormTree nodes should not be unsetable */
0 commit comments