system/src/Grav/Common/GPM/GPM.php
/**
     * Returns the actual version from a dependency version string.
     * Examples:
     *      $versionInformation == '~2.0' => returns '2.0'
     *      $versionInformation == '>=2.0.2' => returns '2.0.2'
     *      $versionInformation == '2.0.2' => returns '2.0.2'
     *      $versionInformation == '*' => returns null
     *      $versionInformation == '' => returns null
     *
     * @param string $version
     *
     * @return null|string
     */
Returns the actual version from a dependency version string.

@param string $version

@return null|string
Returns the actual version from a dependency version string . @param string $version @return null|string
public function calculateVersionNumberFromDependencyVersion($version)
    {
        if ($version == '*') {
            return null;
        } elseif ($version == '') {
            return null;
        } elseif ($this->versionFormatIsNextSignificantRelease($version)) {
            return substr($version, 1);
        } elseif ($this->versionFormatIsEqualOrHigher($version)) {
            return substr($version, 2);
        } else {
            return $version;
        }
    }
public function calculateVersionNumberFromDependencyVersion ( $ version ) { if ( $ version == '*' ) { return null ; } elseif ( $ version == '' ) { return null ; } elseif ( $ this -> versionFormatIsNextSignificantRelease ( $ version ) ) { return substr ( $ version , 1 ) ; } elseif ( $ this -> versionFormatIsEqualOrHigher ( $ version ) ) { return substr ( $ version , 2 ) ; } else { return $ version ; } }
Returns the actual version from a dependency version string.
Returns the actual version from a dependency version string .