MobileHeaders
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 1 Features 2
Metric Value
wmc 0
c 2
b 1
f 2
lcom 0
cbo 1
dl 0
loc 39
1
<?php
2
namespace MobileDetect\Providers;
3
4
class MobileHeaders extends AbstractProvider
5
{
6
    /**
7
     * HTTP headers that trigger the 'isMobile' detection
8
     * to be true.
9
     *
10
     * @var array
11
     */
12
    protected $data = array(
13
14
        'Accept' => array('matches' => array(
15
            // Opera Mini; @reference: http://dev.opera.com/articles/view/opera-binary-markup-language/
0 ignored issues
show
Unused Code Comprehensibility introduced by
45% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
16
            'application/x-obml2d',
17
            // BlackBerry devices.
18
            'application/vnd.rim.html',
19
            'text/vnd.wap.wml',
20
            'application/vnd.wap.xhtml+xml',
21
        )),
22
        'X-WAP-Profile' => null,
23
        'X-WAP-ClientId' => null,
24
        'WAP-Connection' => null,
25
        'Profile' => null,
26
        // Reported by Opera on Nokia devices (eg. C3).
27
        'X-OperaMini-PHONE-UA' => null,
28
        'X-Nokia-IPAddress' => null,
29
        'X-Nokia-Gateway-ID' => null,
30
        'X-Orange-ID' => null,
31
        'X-Vodafone-3GPDPCONTEXT' => null,
32
        'X-HUAWEI-USERID' => null,
33
        // Reported by Windows Smartphones.
34
        'UA-OS' => null,
35
        // Reported by Verizon, Vodafone proxy system.
36
        'X-Mobile-Gateway' => null,
37
        // Seend this on HTC Sensation. @ref: SensationXE_Beats_Z715e.
38
        'X-ATT-DeviceId' => null,
39
        // Seen this on a HTC.
40
        'UA-CPU' => array('matches' => array('ARM')),
41
    );
42
}