private static function checkChromeOs(Os $os, UserAgent $userAgent)
    {
        if (stripos($userAgent->getUserAgentString(), ' CrOS') !== false ||
            stripos($userAgent->getUserAgentString(), 'CrOS ') !== false
        ) {
            $os->setName($os::CHROME_OS);
            if (preg_match('/Chrome\/([\d\.]*)/i', $userAgent->getUserAgentString(), $matches)) {
                $os->setVersion($matches[1]);
            }
            return true;
        }

        return false;
    }
private static function checkChromeOs(Os $os, UserAgent $userAgent)
    {
        if (stripos($userAgent->getUserAgentString(), ' CrOS') !== false ||
            stripos($userAgent->getUserAgentString(), 'CrOS ') !== false
        ) {
            $os->setName($os::CHROME_OS);
            if (preg_match('/Chrome\/([\d\.]*)/i', $userAgent->getUserAgentString(), $matches)) {
                $os->setVersion($matches[1]);
            }
            return true;
        }

        return false;
    }
private static function checkChromeOs ( Os $ os , UserAgent $ userAgent ) { if ( stripos ( $ userAgent -> getUserAgentString ( ) , ' CrOS' ) !== false || stripos ( $ userAgent -> getUserAgentString ( ) , 'CrOS ' ) !== false ) { $ os -> setName ( $ os :: CHROME_OS ) ; if ( preg_match ( '/Chrome\/([\d\.]*)/i' , $ userAgent -> getUserAgentString ( ) , $ matches ) ) { $ os -> setVersion ( $ matches [ 1 ] ) ; } return true ; } return false ; }
Determine if the user's operating system is Chrome OS.

@param Os $os
@param UserAgent $userAgent

@return bool
Determine if the user s operating system is Chrome OS .