protected function parse($semverFile)
    {

        // load the content of the semver file
        $output = file_get_contents($semverFile);

        // initialize the array with the matches
        $matches = array();

        // extract the version information
        if (!preg_match_all(self::REGEX, $output, $matches)) {
            throw new \Exception($this, 'Bad semver file.');
        }

        // prepare and return the version number
        list(, $major, $minor, $patch, $special, $metadata) = array_map('current', $matches);
        return compact('major', 'minor', 'patch', 'special', 'metadata');
    }
protected function parse($semverFile)
    {

        // load the content of the semver file
        $output = file_get_contents($semverFile);

        // initialize the array with the matches
        $matches = array();

        // extract the version information
        if (!preg_match_all(self::REGEX, $output, $matches)) {
            throw new \Exception($this, 'Bad semver file.');
        }

        // prepare and return the version number
        list(, $major, $minor, $patch, $special, $metadata) = array_map('current', $matches);
        return compact('major', 'minor', 'patch', 'special', 'metadata');
    }
protected function parse ( $ semverFile ) { // load the content of the semver file $ output = file_get_contents ( $ semverFile ) ; // initialize the array with the matches $ matches = array ( ) ; // extract the version information if ( ! preg_match_all ( self :: REGEX , $ output , $ matches ) ) { throw new \ Exception ( $ this , 'Bad semver file.' ) ; } // prepare and return the version number list ( , $ major , $ minor , $ patch , $ special , $ metadata ) = array_map ( 'current' , $ matches ) ; return compact ( 'major' , 'minor' , 'patch' , 'special' , 'metadata' ) ; }
Parse and return the version number from the application's .semver file.

@param string $semverFile The path to the semver file

@return array The array with the version information
@throws \Exception Is thrown, if the .semver file is not available or invalid
Parse and return the version number from the application s . semver file .