Skip to content

Commit e304ddc

Browse files
committed
Silence PHP 8.1 deprecation warnings
1 parent 4184e5e commit e304ddc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Collection.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public function contains( $key, $strict = true ) {
8080
*
8181
* @return int
8282
*/
83+
#[\ReturnTypeWillChange]
8384
public function count() {
8485
return count( $this->items );
8586
}
@@ -213,6 +214,7 @@ public function get( $key, $default = null ) {
213214
*
214215
* @return \ArrayIterator
215216
*/
217+
#[\ReturnTypeWillChange]
216218
public function getIterator() {
217219
return new \ArrayIterator( $this->items );
218220
}
@@ -358,6 +360,7 @@ public function intersectByKeys( array $keys ) {
358360
*
359361
* @return array
360362
*/
363+
#[\ReturnTypeWillChange]
361364
public function jsonSerialize() {
362365
return $this->items;
363366
}
@@ -412,6 +415,7 @@ public function merge( array $items ) {
412415
*
413416
* @return bool
414417
*/
418+
#[\ReturnTypeWillChange]
415419
public function offsetExists( $key ) {
416420
return array_key_exists( $key, $this->items );
417421
}
@@ -423,6 +427,7 @@ public function offsetExists( $key ) {
423427
*
424428
* @return mixed
425429
*/
430+
#[\ReturnTypeWillChange]
426431
public function offsetGet( $key ) {
427432
return $this->items[ $key ];
428433
}
@@ -433,6 +438,7 @@ public function offsetGet( $key ) {
433438
* @param mixed $key Key to set
434439
* @param mixed $value Value to set
435440
*/
441+
#[\ReturnTypeWillChange]
436442
public function offsetSet( $key, $value ) {
437443
if ( null === $key ) {
438444
$this->items[] = $value;
@@ -446,6 +452,7 @@ public function offsetSet( $key, $value ) {
446452
*
447453
* @param mixed $key Key to unset
448454
*/
455+
#[\ReturnTypeWillChange]
449456
public function offsetUnset( $key ) {
450457
unset( $this->items[ $key ] );
451458
}

0 commit comments

Comments
 (0)