X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Flibs%2FGenericArrayObject.php;h=76e23cfd50cfb8b7fea1450e6e685065d62f09fd;hp=93ae83b2723b4beb6f1939d41b45a6c755b2e883;hb=f43fa6f4f0e2cb60b8543daad661b48a3e0653a9;hpb=04fdc78370dbc042116488d6826e19bf3910273b diff --git a/includes/libs/GenericArrayObject.php b/includes/libs/GenericArrayObject.php index 93ae83b272..76e23cfd50 100644 --- a/includes/libs/GenericArrayObject.php +++ b/includes/libs/GenericArrayObject.php @@ -77,7 +77,7 @@ abstract class GenericArrayObject extends ArrayObject { * @param string $iterator_class */ public function __construct( $input = null, $flags = 0, $iterator_class = 'ArrayIterator' ) { - parent::__construct( array(), $flags, $iterator_class ); + parent::__construct( [], $flags, $iterator_class ); if ( !is_null( $input ) ) { foreach ( $input as $offset => $value ) { @@ -144,7 +144,7 @@ abstract class GenericArrayObject extends ArrayObject { if ( !$this->hasValidType( $value ) ) { throw new InvalidArgumentException( 'Can only add ' . $this->getObjectType() . ' implementing objects to ' - . get_called_class() . '.' + . static::class . '.' ); } @@ -198,10 +198,10 @@ abstract class GenericArrayObject extends ArrayObject { * @return array */ protected function getSerializationData() { - return array( + return [ 'data' => $this->getArrayCopy(), 'index' => $this->indexOffset, - ); + ]; } /**