Merge "Perform a permission check on the title when changing the page language"
[lhc/web/wiklou.git] / includes / libs / GenericArrayObject.php
index 93ae83b..f76d9a2 100644 (file)
@@ -67,7 +67,6 @@ abstract class GenericArrayObject extends ArrayObject {
        }
 
        /**
-        * Constructor.
         * @see ArrayObject::__construct
         *
         * @since 1.20
@@ -77,7 +76,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 +143,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 +197,10 @@ abstract class GenericArrayObject extends ArrayObject {
         * @return array
         */
        protected function getSerializationData() {
-               return array(
+               return [
                        'data' => $this->getArrayCopy(),
                        'index' => $this->indexOffset,
-               );
+               ];
        }
 
        /**