X-Git-Url: http://git.cyclocoop.org/%28?a=blobdiff_plain;f=includes%2Flibs%2FMappedIterator.php;h=4a62e72909a15d24f7e7fd3cc5b3a48863da3517;hb=46b361d7431d71c86f8c34f5e43549426dd67fb7;hp=7fdde8a81afddea9a6ec1dd8c7b515e7c18421bf;hpb=314d87c23976f6f51ba368b9b6babfed8a5c8839;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/MappedIterator.php b/includes/libs/MappedIterator.php index 7fdde8a81a..4a62e72909 100644 --- a/includes/libs/MappedIterator.php +++ b/includes/libs/MappedIterator.php @@ -18,7 +18,6 @@ * http://www.gnu.org/copyleft/gpl.html * * @file - * @author Aaron Schulz */ /** @@ -32,7 +31,7 @@ class MappedIterator extends FilterIterator { /** @var callable */ protected $aCallback; /** @var array */ - protected $cache = array(); + protected $cache = []; protected $rewound = false; // boolean; whether rewind() has been called @@ -51,7 +50,7 @@ class MappedIterator extends FilterIterator { * @param array $options Options map (includes "accept") (since 1.22) * @throws UnexpectedValueException */ - public function __construct( $iter, $vCallback, array $options = array() ) { + public function __construct( $iter, $vCallback, array $options = [] ) { if ( is_array( $iter ) ) { $baseIterator = new ArrayIterator( $iter ); } elseif ( $iter instanceof Iterator ) { @@ -61,17 +60,17 @@ class MappedIterator extends FilterIterator { } parent::__construct( $baseIterator ); $this->vCallback = $vCallback; - $this->aCallback = isset( $options['accept'] ) ? $options['accept'] : null; + $this->aCallback = $options['accept'] ?? null; } public function next() { - $this->cache = array(); + $this->cache = []; parent::next(); } public function rewind() { $this->rewound = true; - $this->cache = array(); + $this->cache = []; parent::rewind(); }