public static function getVersionForNumber(int $versionNumber) : self
    {
        if ($versionNumber < 1 || $versionNumber > 40) {
            throw new InvalidArgumentException('Version number must be between 1 and 40');
        }

        return self::versions()[$versionNumber - 1];
    }
public static function getVersionForNumber(int $versionNumber) : self
    {
        if ($versionNumber < 1 || $versionNumber > 40) {
            throw new InvalidArgumentException('Version number must be between 1 and 40');
        }

        return self::versions()[$versionNumber - 1];
    }
public static function getVersionForNumber ( int $ versionNumber ) : self { if ( $ versionNumber < 1 || $ versionNumber > 40 ) { throw new InvalidArgumentException ( 'Version number must be between 1 and 40' ) ; } return self :: versions ( ) [ $ versionNumber - 1 ] ; }
Gets a version instance for a specific version number.

@throws InvalidArgumentException if version number is out of range
Gets a version instance for a specific version number .