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;
    }