* @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 ) {
if ( !$this->hasValidType( $value ) ) {
throw new InvalidArgumentException(
'Can only add ' . $this->getObjectType() . ' implementing objects to '
- . get_called_class() . '.'
+ . static::class . '.'
);
}
* @return array
*/
protected function getSerializationData() {
- return array(
+ return [
'data' => $this->getArrayCopy(),
'index' => $this->indexOffset,
- );
+ ];
}
/**