src/Internal/ControlUtils.php
public static function getWrapperGenerator(array $yieldables, callable $filter)
    {
        $gens = [];
        foreach ($yieldables as $yieldable) {
            $gens[(string)$yieldable['value']] = $filter($yieldable['value']);
        }
        yield CoInterface::RETURN_WITH => (yield $gens);
        // @codeCoverageIgnoreStart
    }
public static function getWrapperGenerator(array $yieldables, callable $filter)
    {
        $gens = [];
        foreach ($yieldables as $yieldable) {
            $gens[(string)$yieldable['value']] = $filter($yieldable['value']);
        }
        yield CoInterface::RETURN_WITH => (yield $gens);
        // @codeCoverageIgnoreStart
    }
public static function getWrapperGenerator ( array $ yieldables , callable $ filter ) { $ gens = [ ] ; foreach ( $ yieldables as $ yieldable ) { $ gens [ ( string ) $ yieldable [ 'value' ] ] = $ filter ( $ yieldable [ 'value' ] ) ; } yield CoInterface :: RETURN_WITH => ( yield $ gens ) ; // @codeCoverageIgnoreStart }
Wrap yieldables with specified filter function.
@param  array    $yieldables
@param  callable $filter     self::reverse or self::fail.
@return \Generator
Wrap yieldables with specified filter function .