private function parseVersion()
    {
        if (StaticStringy::startsWith($this->versionString, 'v')) {
            $this->versionString = StaticStringy::substr($this->versionString, 1);
        }
        if (strstr($this->versionString, '-')) {
            if (sscanf(
                $this->versionString,
                '%d.%d.%d-%s',
                $this->major,
                $this->minor,
                $this->release,
                $this->suffix
            ) != 4
            ) {
                throw new InvalidArgumentException('Invalid version format ' . $this->versionString);
            }
        } else {
            if (sscanf($this->versionString, '%d.%d.%d', $this->major, $this->minor, $this->release) != 3) {
                throw new InvalidArgumentException('Invalid version format ' . $this->versionString);
            }
        }
    }
private function parseVersion()
    {
        if (StaticStringy::startsWith($this->versionString, 'v')) {
            $this->versionString = StaticStringy::substr($this->versionString, 1);
        }
        if (strstr($this->versionString, '-')) {
            if (sscanf(
                $this->versionString,
                '%d.%d.%d-%s',
                $this->major,
                $this->minor,
                $this->release,
                $this->suffix
            ) != 4
            ) {
                throw new InvalidArgumentException('Invalid version format ' . $this->versionString);
            }
        } else {
            if (sscanf($this->versionString, '%d.%d.%d', $this->major, $this->minor, $this->release) != 3) {
                throw new InvalidArgumentException('Invalid version format ' . $this->versionString);
            }
        }
    }
private function parseVersion ( ) { if ( StaticStringy :: startsWith ( $ this -> versionString , 'v' ) ) { $ this -> versionString = StaticStringy :: substr ( $ this -> versionString , 1 ) ; } if ( strstr ( $ this -> versionString , '-' ) ) { if ( sscanf ( $ this -> versionString , '%d.%d.%d-%s' , $ this -> major , $ this -> minor , $ this -> release , $ this -> suffix ) != 4 ) { throw new InvalidArgumentException ( 'Invalid version format ' . $ this -> versionString ) ; } } else { if ( sscanf ( $ this -> versionString , '%d.%d.%d' , $ this -> major , $ this -> minor , $ this -> release ) != 3 ) { throw new InvalidArgumentException ( 'Invalid version format ' . $ this -> versionString ) ; } } }
Parse version string

@throws \ThinFrame\Foundation\Exception\InvalidArgumentException
Parse version string