public function extractAll(array $requires)
    {
        $flags = array();

        foreach ($requires as $name => $link) {
            $name = strtolower($name);
            $version = $link->getPrettyConstraint();

            $stability = $this->getExplicitStability($version);

            if ($stability === null) {
                $stability = $this->getParsedStability($version);
            }

            $flags[$name] = max($stability, $this->getCurrentStability($name));
        }

        // Filter out null stability values
        return array_filter($flags, function ($v) {
            return $v !== null;
        });
    }
public function extractAll(array $requires)
    {
        $flags = array();

        foreach ($requires as $name => $link) {
            $name = strtolower($name);
            $version = $link->getPrettyConstraint();

            $stability = $this->getExplicitStability($version);

            if ($stability === null) {
                $stability = $this->getParsedStability($version);
            }

            $flags[$name] = max($stability, $this->getCurrentStability($name));
        }

        // Filter out null stability values
        return array_filter($flags, function ($v) {
            return $v !== null;
        });
    }
public function extractAll ( array $ requires ) { $ flags = array ( ) ; foreach ( $ requires as $ name => $ link ) { $ name = strtolower ( $ name ) ; $ version = $ link -> getPrettyConstraint ( ) ; $ stability = $ this -> getExplicitStability ( $ version ) ; if ( $ stability === null ) { $ stability = $ this -> getParsedStability ( $ version ) ; } $ flags [ $ name ] = max ( $ stability , $ this -> getCurrentStability ( $ name ) ) ; } // Filter out null stability values return array_filter ( $ flags , function ( $ v ) { return $ v !== null ; } ) ; }
Extract and merge stability flags from the given collection of
requires with another collection of stability flags.

@param array $requires New package name => link mappings
@return array Unified package name => stability mappings
Extract and merge stability flags from the given collection of requires with another collection of stability flags .