1 | <?php |
||
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/ |
||
|
|||
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 | } |
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.