private static function checkIOS(Os $os, UserAgent $userAgent)
    {
        if (stripos($userAgent->getUserAgentString(), 'CPU OS') !== false ||
            stripos($userAgent->getUserAgentString(), 'iPhone OS') !== false &&
            stripos($userAgent->getUserAgentString(), 'OS X')) {
            $os->setName($os::IOS);
            if (preg_match('/CPU( iPhone)? OS ([\d_]*)/i', $userAgent->getUserAgentString(), $matches)) {
                $os->setVersion(str_replace('_', '.', $matches[2]));
            }
            $os->setIsMobile(true);

            return true;
        }

        return false;
    }
private static function checkIOS(Os $os, UserAgent $userAgent)
    {
        if (stripos($userAgent->getUserAgentString(), 'CPU OS') !== false ||
            stripos($userAgent->getUserAgentString(), 'iPhone OS') !== false &&
            stripos($userAgent->getUserAgentString(), 'OS X')) {
            $os->setName($os::IOS);
            if (preg_match('/CPU( iPhone)? OS ([\d_]*)/i', $userAgent->getUserAgentString(), $matches)) {
                $os->setVersion(str_replace('_', '.', $matches[2]));
            }
            $os->setIsMobile(true);

            return true;
        }

        return false;
    }
private static function checkIOS ( Os $ os , UserAgent $ userAgent ) { if ( stripos ( $ userAgent -> getUserAgentString ( ) , 'CPU OS' ) !== false || stripos ( $ userAgent -> getUserAgentString ( ) , 'iPhone OS' ) !== false && stripos ( $ userAgent -> getUserAgentString ( ) , 'OS X' ) ) { $ os -> setName ( $ os :: IOS ) ; if ( preg_match ( '/CPU( iPhone)? OS ([\d_]*)/i' , $ userAgent -> getUserAgentString ( ) , $ matches ) ) { $ os -> setVersion ( str_replace ( '_' , '.' , $ matches [ 2 ] ) ) ; } $ os -> setIsMobile ( true ) ; return true ; } return false ; }
Determine if the user's operating system is iOS.

@param Os $os
@param UserAgent $userAgent

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