private static function parseValid(Composer $composer, $class, $constraint)
    {
        if ($constraint === null) {
            return false;
        }

        $provides = $composer->getPackage()->getProvides();
        $boltVersion = isset($provides['bolt/bolt']) ? $provides['bolt/bolt'] : new Link('__root__', 'bolt/bolt', new Constraint('=', '0.0.0'));

        return $class && Semver::satisfies($boltVersion->getPrettyConstraint(), $constraint);
    }
private static function parseValid(Composer $composer, $class, $constraint)
    {
        if ($constraint === null) {
            return false;
        }

        $provides = $composer->getPackage()->getProvides();
        $boltVersion = isset($provides['bolt/bolt']) ? $provides['bolt/bolt'] : new Link('__root__', 'bolt/bolt', new Constraint('=', '0.0.0'));

        return $class && Semver::satisfies($boltVersion->getPrettyConstraint(), $constraint);
    }
private static function parseValid ( Composer $ composer , $ class , $ constraint ) { if ( $ constraint === null ) { return false ; } $ provides = $ composer -> getPackage ( ) -> getProvides ( ) ; $ boltVersion = isset ( $ provides [ 'bolt/bolt' ] ) ? $ provides [ 'bolt/bolt' ] : new Link ( '__root__' , 'bolt/bolt' , new Constraint ( '=' , '0.0.0' ) ) ; return $ class && Semver :: satisfies ( $ boltVersion -> getPrettyConstraint ( ) , $ constraint ) ; }
Check if the extension is valid for loading, i.e has a class and is withing version constraints.

@param Composer    $composer
@param string|null $class
@param string|null $constraint

@return bool
Check if the extension is valid for loading i . e has a class and is withing version constraints .