Skip to content

Commit ece44ad

Browse files
author
Patrik Foldes
committed
fix deprecations
1 parent 9656e14 commit ece44ad

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/spec/Paths.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ public function getErrors(): array
183183
* @return boolean true on success or false on failure.
184184
* The return value will be casted to boolean if non-boolean was returned.
185185
*/
186+
#[\ReturnTypeWillChange]
186187
public function offsetExists($offset)
187188
{
188189
return $this->hasPath($offset);
@@ -194,6 +195,7 @@ public function offsetExists($offset)
194195
* @param mixed $offset The offset to retrieve.
195196
* @return PathItem Can return all value types.
196197
*/
198+
#[\ReturnTypeWillChange]
197199
public function offsetGet($offset)
198200
{
199201
return $this->getPath($offset);
@@ -205,6 +207,7 @@ public function offsetGet($offset)
205207
* @param mixed $offset The offset to assign the value to.
206208
* @param mixed $value The value to set.
207209
*/
210+
#[\ReturnTypeWillChange]
208211
public function offsetSet($offset, $value)
209212
{
210213
$this->addPath($offset, $value);
@@ -215,6 +218,7 @@ public function offsetSet($offset, $value)
215218
* @link http://php.net/manual/en/arrayaccess.offsetunset.php
216219
* @param mixed $offset The offset to unset.
217220
*/
221+
#[\ReturnTypeWillChange]
218222
public function offsetUnset($offset)
219223
{
220224
$this->removePath($offset);
@@ -226,6 +230,7 @@ public function offsetUnset($offset)
226230
* @return int The custom count as an integer.
227231
* The return value is cast to an integer.
228232
*/
233+
#[\ReturnTypeWillChange]
229234
public function count()
230235
{
231236
return count($this->_paths);
@@ -236,6 +241,7 @@ public function count()
236241
* @link http://php.net/manual/en/iteratoraggregate.getiterator.php
237242
* @return Traversable An instance of an object implementing <b>Iterator</b> or <b>Traversable</b>
238243
*/
244+
#[\ReturnTypeWillChange]
239245
public function getIterator()
240246
{
241247
return new ArrayIterator($this->_paths);

0 commit comments

Comments
 (0)