private static function checkWindowsPhone(Os $os, UserAgent $userAgent)
    {
        if (stripos($userAgent->getUserAgentString(), 'Windows Phone') !== false) {
            $os->setIsMobile(true);
            $os->setName($os::WINDOWS_PHONE);
            // Windows version
            if (preg_match('/Windows Phone ([\d\.]*)/i', $userAgent->getUserAgentString(), $matches)) {
                if (isset($matches[1])) {
                    $os->setVersion((float)$matches[1]);
                }
            }
    
            return true;
        }
        return false;
    }
private static function checkWindowsPhone(Os $os, UserAgent $userAgent)
    {
        if (stripos($userAgent->getUserAgentString(), 'Windows Phone') !== false) {
            $os->setIsMobile(true);
            $os->setName($os::WINDOWS_PHONE);
            // Windows version
            if (preg_match('/Windows Phone ([\d\.]*)/i', $userAgent->getUserAgentString(), $matches)) {
                if (isset($matches[1])) {
                    $os->setVersion((float)$matches[1]);
                }
            }
    
            return true;
        }
        return false;
    }
private static function checkWindowsPhone ( Os $ os , UserAgent $ userAgent ) { if ( stripos ( $ userAgent -> getUserAgentString ( ) , 'Windows Phone' ) !== false ) { $ os -> setIsMobile ( true ) ; $ os -> setName ( $ os :: WINDOWS_PHONE ) ; // Windows version if ( preg_match ( '/Windows Phone ([\d\.]*)/i' , $ userAgent -> getUserAgentString ( ) , $ matches ) ) { if ( isset ( $ matches [ 1 ] ) ) { $ os -> setVersion ( ( float ) $ matches [ 1 ] ) ; } } return true ; } return false ; }
Determine if the user's operating system is Windows Phone.

@param Os $os
@param UserAgent $userAgent

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