@@ -11,6 +11,7 @@ class Collection extends Model implements \Iterator, \Countable
1111{
1212 protected $ collection_key = 'items ' ;
1313
14+ /** @return void */
1415 #[\ReturnTypeWillChange]
1516 public function rewind ()
1617 {
@@ -20,6 +21,7 @@ public function rewind()
2021 }
2122 }
2223
24+ /** @return mixed */
2325 #[\ReturnTypeWillChange]
2426 public function current ()
2527 {
@@ -29,6 +31,7 @@ public function current()
2931 }
3032 }
3133
34+ /** @return mixed */
3235 #[\ReturnTypeWillChange]
3336 public function key ()
3437 {
@@ -38,19 +41,22 @@ public function key()
3841 }
3942 }
4043
44+ /** @return void */
4145 #[\ReturnTypeWillChange]
4246 public function next ()
4347 {
4448 return next ($ this ->{$ this ->collection_key });
4549 }
4650
51+ /** @return bool */
4752 #[\ReturnTypeWillChange]
4853 public function valid ()
4954 {
5055 $ key = $ this ->key ();
5156 return $ key !== null && $ key !== false ;
5257 }
5358
59+ /** @return int */
5460 #[\ReturnTypeWillChange]
5561 public function count ()
5662 {
@@ -60,6 +66,7 @@ public function count()
6066 return count ($ this ->{$ this ->collection_key });
6167 }
6268
69+ /** @return bool */
6370 public function offsetExists ($ offset )
6471 {
6572 if (!is_numeric ($ offset )) {
@@ -68,6 +75,7 @@ public function offsetExists($offset)
6875 return isset ($ this ->{$ this ->collection_key }[$ offset ]);
6976 }
7077
78+ /** @return mixed */
7179 public function offsetGet ($ offset )
7280 {
7381 if (!is_numeric ($ offset )) {
@@ -77,6 +85,7 @@ public function offsetGet($offset)
7785 return $ this ->{$ this ->collection_key }[$ offset ];
7886 }
7987
88+ /** @return void */
8089 public function offsetSet ($ offset , $ value )
8190 {
8291 if (!is_numeric ($ offset )) {
@@ -85,6 +94,7 @@ public function offsetSet($offset, $value)
8594 $ this ->{$ this ->collection_key }[$ offset ] = $ value ;
8695 }
8796
97+ /** @return void */
8898 public function offsetUnset ($ offset )
8999 {
90100 if (!is_numeric ($ offset )) {
0 commit comments