@@ -17,6 +17,7 @@ class Storage extends Component implements StorageInterface, \Countable, \Iterat
1717
1818 private $ _cursor = 0 ;
1919
20+ #[\ReturnTypeWillChange]
2021 public function removeAll ()
2122 {
2223 $ this ->_container = [];
@@ -27,6 +28,7 @@ public function removeAll()
2728 * @param string $name
2829 * @param Event $event
2930 */
31+ #[\ReturnTypeWillChange]
3032 public function trigger ($ name , Event $ event = null )
3133 {
3234 parent ::trigger ($ name , $ event );
@@ -39,6 +41,7 @@ public function trigger($name, Event $event = null)
3941 /**
4042 * @inheritdoc
4143 */
44+ #[\ReturnTypeWillChange]
4245 public function validate ()
4346 {
4447 $ hasError = false ;
@@ -54,6 +57,7 @@ public function validate()
5457 /**
5558 * @inheritdoc
5659 */
60+ #[\ReturnTypeWillChange]
5761 public function getAttributes ()
5862 {
5963 $ attributes = [];
@@ -69,6 +73,7 @@ public function getAttributes()
6973 * @param $condition
7074 * @return null| EmbeddedDocument
7175 */
76+ #[\ReturnTypeWillChange]
7277 public function get ($ condition )
7378 {
7479 list ($ attribute , $ value ) = $ condition ;
@@ -87,6 +92,7 @@ public function get($condition)
8792 * @param $object
8893 * @return bool
8994 */
95+ #[\ReturnTypeWillChange]
9096 public function set ($ condition , $ object )
9197 {
9298 list ($ attribute , $ value ) = $ condition ;
@@ -100,6 +106,7 @@ public function set($condition, $object)
100106 return false ;
101107 }
102108
109+ #[\ReturnTypeWillChange]
103110 public function sort ($ field )
104111 {
105112 $ attributes = $ this ->attributes ;
@@ -111,6 +118,7 @@ public function sort($field)
111118 });
112119 }
113120
121+ #[\ReturnTypeWillChange]
114122 public function offsetSet ($ offset , $ model )
115123 {
116124 if (is_null ($ offset )) {
@@ -120,6 +128,7 @@ public function offsetSet($offset, $model)
120128 $ this ->_container [$ offset ] = $ model ;
121129 }
122130
131+ #[\ReturnTypeWillChange]
123132 public function current ()
124133 {
125134 if ($ this ->valid ($ this ->_cursor )) {
@@ -129,47 +138,56 @@ public function current()
129138 }
130139 }
131140
141+ #[\ReturnTypeWillChange]
132142 public function key ()
133143 {
134144 return $ this ->_cursor ;
135145 }
136146
147+ #[\ReturnTypeWillChange]
137148 public function next ()
138149 {
139150 ++$ this ->_cursor ;
140151 }
141152
153+ #[\ReturnTypeWillChange]
142154 public function rewind ()
143155 {
144156 $ this ->_cursor = 0 ;
145157 }
146158
159+ #[\ReturnTypeWillChange]
147160 public function valid ()
148161 {
149162 return $ this ->offsetExists ($ this ->_cursor );
150163 }
151164
165+ #[\ReturnTypeWillChange]
152166 public function offsetExists ($ offset )
153167 {
154168 return isset ($ this ->_container [$ offset ]);
155169 }
156170
171+ #[\ReturnTypeWillChange]
157172 public function offsetUnset ($ offset )
158173 {
159174 unset($ this ->_container [$ offset ]);
160175 $ this ->_container = array_values ($ this ->_container );
161176 }
162177
178+ #[\ReturnTypeWillChange]
163179 public function offsetGet ($ offset )
164180 {
165181 return isset ($ this ->_container [$ offset ]) ? $ this ->_container [$ offset ] : null ;
166182 }
167183
184+ #[\ReturnTypeWillChange]
168185 public function count ()
169186 {
170187 return count ($ this ->_container );
171188 }
172189
190+ #[\ReturnTypeWillChange]
173191 public function getNextIndex ()
174192 {
175193 $ count = count ($ this ->_container );
@@ -181,6 +199,7 @@ public function getNextIndex()
181199 * @param string $scenario
182200 * @return void
183201 */
202+ #[\ReturnTypeWillChange]
184203 public function setScenario ($ scenario )
185204 {
186205 foreach ($ this ->_container as $ model ) {
@@ -189,6 +208,7 @@ public function setScenario($scenario)
189208 }
190209 }
191210
211+ #[\ReturnTypeWillChange]
192212 public function __toString ()
193213 {
194214 return '' ;
0 commit comments