src/Analyzers/VersionAnalyzer.php
private function getVersion($version, $subVersion)
    {
        switch ($version) {
            case 'TRL 9.3':
                return $this->isMgx ? Version::VERSION_AOCTRIAL : Version::VERSION_AOKTRIAL;
            case 'VER 9.3':
                return Version::VERSION_AOK;
            case 'VER 9.4':
                if ($subVersion >= 12.50) {
                    return Version::VERSION_HD50;
                }
                if ($subVersion >= 12.49) {
                    return Version::VERSION_HD48;
                }
                if ($subVersion >= 12.36) {
                    // Patch versions 4.6 and 4.7.
                    return Version::VERSION_HD46;
                }
                if ($subVersion >= 12.34) {
                    // Probably versions 4.3 through 4.5?
                    return Version::VERSION_HD43;
                }
                if ($subVersion > 11.76) {
                    return Version::VERSION_HD;
                }
                return Version::VERSION_AOC;
            case 'VER 9.5':
                return Version::VERSION_AOFE21;
            case 'VER 9.8':
                return Version::VERSION_USERPATCH12;
            case 'VER 9.9':
                return Version::VERSION_USERPATCH13;
            // UserPatch 1.4 RC 1
            case 'VER 9.A':
            // UserPatch 1.4 RC 2
            case 'VER 9.B':
            case 'VER 9.C':
            case 'VER 9.D':
                return Version::VERSION_USERPATCH14;
            case 'VER 9.E':
            case 'VER 9.F':
                return Version::VERSION_USERPATCH15;
            default:
                return $version;
        }
    }
private function getVersion($version, $subVersion)
    {
        switch ($version) {
            case 'TRL 9.3':
                return $this->isMgx ? Version::VERSION_AOCTRIAL : Version::VERSION_AOKTRIAL;
            case 'VER 9.3':
                return Version::VERSION_AOK;
            case 'VER 9.4':
                if ($subVersion >= 12.50) {
                    return Version::VERSION_HD50;
                }
                if ($subVersion >= 12.49) {
                    return Version::VERSION_HD48;
                }
                if ($subVersion >= 12.36) {
                    // Patch versions 4.6 and 4.7.
                    return Version::VERSION_HD46;
                }
                if ($subVersion >= 12.34) {
                    // Probably versions 4.3 through 4.5?
                    return Version::VERSION_HD43;
                }
                if ($subVersion > 11.76) {
                    return Version::VERSION_HD;
                }
                return Version::VERSION_AOC;
            case 'VER 9.5':
                return Version::VERSION_AOFE21;
            case 'VER 9.8':
                return Version::VERSION_USERPATCH12;
            case 'VER 9.9':
                return Version::VERSION_USERPATCH13;
            // UserPatch 1.4 RC 1
            case 'VER 9.A':
            // UserPatch 1.4 RC 2
            case 'VER 9.B':
            case 'VER 9.C':
            case 'VER 9.D':
                return Version::VERSION_USERPATCH14;
            case 'VER 9.E':
            case 'VER 9.F':
                return Version::VERSION_USERPATCH15;
            default:
                return $version;
        }
    }
private function getVersion ( $ version , $ subVersion ) { switch ( $ version ) { case 'TRL 9.3' : return $ this -> isMgx ? Version :: VERSION_AOCTRIAL : Version :: VERSION_AOKTRIAL ; case 'VER 9.3' : return Version :: VERSION_AOK ; case 'VER 9.4' : if ( $ subVersion >= 12.50 ) { return Version :: VERSION_HD50 ; } if ( $ subVersion >= 12.49 ) { return Version :: VERSION_HD48 ; } if ( $ subVersion >= 12.36 ) { // Patch versions 4.6 and 4.7. return Version :: VERSION_HD46 ; } if ( $ subVersion >= 12.34 ) { // Probably versions 4.3 through 4.5? return Version :: VERSION_HD43 ; } if ( $ subVersion > 11.76 ) { return Version :: VERSION_HD ; } return Version :: VERSION_AOC ; case 'VER 9.5' : return Version :: VERSION_AOFE21 ; case 'VER 9.8' : return Version :: VERSION_USERPATCH12 ; case 'VER 9.9' : return Version :: VERSION_USERPATCH13 ; // UserPatch 1.4 RC 1 case 'VER 9.A' : // UserPatch 1.4 RC 2 case 'VER 9.B' : case 'VER 9.C' : case 'VER 9.D' : return Version :: VERSION_USERPATCH14 ; case 'VER 9.E' : case 'VER 9.F' : return Version :: VERSION_USERPATCH15 ; default : return $ version ; } }
Get the version ID from a version string and sub-version number.

@param string  $version  Version string, found at the start of the file
header.
@param float  $subVersion  Sub-version number.
@return int Game version ID.
Get the version ID from a version string and sub - version number .