mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 21:41:19 +08:00
Upgrade tests for PHP 7.4. (#20545)
This commit is contained in:
@ -1,12 +1,18 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @link https://www.yiiframework.com/
|
||||
* @copyright Copyright (c) 2008 Yii Software LLC
|
||||
* @license https://www.yiiframework.com/license/
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace yiiunit\data\base;
|
||||
|
||||
use ArrayAccess;
|
||||
use ReturnTypeWillChange;
|
||||
|
||||
/**
|
||||
* ArrayAccessObject
|
||||
* Object that extends [[TraversableObject]] and implements `\ArrayAccess`
|
||||
@ -14,7 +20,7 @@ namespace yiiunit\data\base;
|
||||
* @author Dmytro Naumenko <d.naumenko.a@gmail.com>
|
||||
* @since 2.0.14.1
|
||||
*/
|
||||
class ArrayAccessObject extends TraversableObject implements \ArrayAccess
|
||||
class ArrayAccessObject extends TraversableObject implements ArrayAccess
|
||||
{
|
||||
/**
|
||||
* Whether a offset exists
|
||||
@ -29,8 +35,7 @@ class ArrayAccessObject extends TraversableObject implements \ArrayAccess
|
||||
* The return value will be casted to boolean if non-boolean was returned.
|
||||
* @since 2.0.14.1
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetExists($offset)
|
||||
public function offsetExists($offset): bool
|
||||
{
|
||||
return isset($this->data[$offset]);
|
||||
}
|
||||
@ -45,7 +50,7 @@ class ArrayAccessObject extends TraversableObject implements \ArrayAccess
|
||||
* @return mixed Can return all value types.
|
||||
* @since 2.0.14.1
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->data[$offset];
|
||||
@ -64,8 +69,7 @@ class ArrayAccessObject extends TraversableObject implements \ArrayAccess
|
||||
* @return void
|
||||
* @since 2.0.14.1
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetSet($offset, $value)
|
||||
public function offsetSet($offset, $value): void
|
||||
{
|
||||
$this->data[$offset] = $value;
|
||||
}
|
||||
@ -80,8 +84,7 @@ class ArrayAccessObject extends TraversableObject implements \ArrayAccess
|
||||
* @return void
|
||||
* @since 2.0.14.1
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetUnset($offset)
|
||||
public function offsetUnset($offset): void
|
||||
{
|
||||
unset($this->data[$offset]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user