src/Version/Trident.php
/**
     * returns the version of the operating system/platform
     */
returns the version of the operating system/platform
returns the version of the operating system / platform
public function detectVersion(string $useragent): VersionInterface
    {
        $doMatch = preg_match('/Trident\/(?P<version>[\d\.]+)/', $useragent, $matches);
        if ($doMatch) {
            try {
                return $this->versionFactory->set($matches['version']);
            } catch (NotNumericException $e) {
                $this->logger->info($e);
            }
        }
        return new NullVersion();
    }
public function detectVersion ( string $ useragent ) : VersionInterface { $ doMatch = preg_match ( '/Trident\/(?P<version>[\d\.]+)/' , $ useragent , $ matches ) ; if ( $ doMatch ) { try { return $ this -> versionFactory -> set ( $ matches [ 'version' ] ) ; } catch ( NotNumericException $ e ) { $ this -> logger -> info ( $ e ) ; } } return new NullVersion ( ) ; }
returns the version of the operating system/platform
returns the version of the operating system / platform