X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2FMappedIterator.php;h=9d53a861f632ffd58dc58840b74e27212bf44fa7;hb=35243c574fa96b447d1683a9cae234ec7958d611;hp=4a62e72909a15d24f7e7fd3cc5b3a48863da3517;hpb=485f66f1744fea056e20a5bef619989bf1749202;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/MappedIterator.php b/includes/libs/MappedIterator.php index 4a62e72909..9d53a861f6 100644 --- a/includes/libs/MappedIterator.php +++ b/includes/libs/MappedIterator.php @@ -45,9 +45,10 @@ class MappedIterator extends FilterIterator { * the base iterator (post-callback) and will return true if that value should be * included in iteration of the MappedIterator (otherwise it will be filtered out). * - * @param Iterator|Array $iter + * @param Iterator|array $iter * @param callable $vCallback Value transformation callback * @param array $options Options map (includes "accept") (since 1.22) + * @phan-param array{accept?:callable} $options * @throws UnexpectedValueException */ public function __construct( $iter, $vCallback, array $options = [] ) { @@ -60,6 +61,7 @@ class MappedIterator extends FilterIterator { } parent::__construct( $baseIterator ); $this->vCallback = $vCallback; + // @phan-suppress-next-line PhanTypeInvalidDimOffset $this->aCallback = $options['accept'] ?? null; }