public function getRequiredVersion(RootPackageInterface $package)
    {
        foreach (array($package->getRequires(), $package->getDevRequires()) as $requiredPackages) {
            if (isset($requiredPackages[static::PACKAGE_NAME])) {
                return $requiredPackages[static::PACKAGE_NAME]->getPrettyConstraint();
            }
        }
        throw new \RuntimeException('Can not determine required version of ' . static::PACKAGE_NAME);
    }
public function getRequiredVersion(RootPackageInterface $package)
    {
        foreach (array($package->getRequires(), $package->getDevRequires()) as $requiredPackages) {
            if (isset($requiredPackages[static::PACKAGE_NAME])) {
                return $requiredPackages[static::PACKAGE_NAME]->getPrettyConstraint();
            }
        }
        throw new \RuntimeException('Can not determine required version of ' . static::PACKAGE_NAME);
    }
public function getRequiredVersion ( RootPackageInterface $ package ) { foreach ( array ( $ package -> getRequires ( ) , $ package -> getDevRequires ( ) ) as $ requiredPackages ) { if ( isset ( $ requiredPackages [ static :: PACKAGE_NAME ] ) ) { return $ requiredPackages [ static :: PACKAGE_NAME ] -> getPrettyConstraint ( ) ; } } throw new \ RuntimeException ( 'Can not determine required version of ' . static :: PACKAGE_NAME ) ; }
Returns the version for the given package either from the "require" or "require-dev" packages array.

@param RootPackageInterface $package
@throws \RuntimeException
@return mixed
Returns the version for the given package either from the require or require - dev packages array .