Exclusions
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 59
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 0
lcom 0
cbo 1
dl 0
loc 59
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of Crawler Detect - the web crawler detection library.
5
 *
6
 * (c) Mark Beech <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Jaybizzle\CrawlerDetect\Fixtures;
13
14
class Exclusions extends AbstractProvider
15
{
16
    /**
17
     * List of strings to remove from the user agent before running the crawler regex
18
     * Over a large list of user agents, this gives us about a 55% speed increase!
19
     *
20
     * @var array
21
     */
22
    protected $data = array(
23
        'Safari.[\d\.]*',
24
        'Firefox.[\d\.]*',
25
        ' Chrome.[\d\.]*',
26
        'Chromium.[\d\.]*',
27
        'MSIE.[\d\.]',
28
        'Opera\/[\d\.]*',
29
        'Mozilla.[\d\.]*',
30
        'AppleWebKit.[\d\.]*',
31
        'Trident.[\d\.]*',
32
        'Windows NT.[\d\.]*',
33
        'Android [\d\.]*',
34
        'Macintosh.',
35
        'Ubuntu',
36
        'Linux',
37
        '[ ]Intel',
38
        'Mac OS X [\d_]*',
39
        '(like )?Gecko(.[\d\.]*)?',
40
        'KHTML,',
41
        'CriOS.[\d\.]*',
42
        'CPU iPhone OS ([0-9_])* like Mac OS X',
43
        'CPU OS ([0-9_])* like Mac OS X',
44
        'iPod',
45
        'compatible',
46
        'x86_..',
47
        'i686',
48
        'x64',
49
        'X11',
50
        'rv:[\d\.]*',
51
        'Version.[\d\.]*',
52
        'WOW64',
53
        'Win64',
54
        'Dalvik.[\d\.]*',
55
        ' \.NET CLR [\d\.]*',
56
        'Presto.[\d\.]*',
57
        'Media Center PC',
58
        'BlackBerry',
59
        'Build',
60
        'Opera Mini\/\d{1,2}\.\d{1,2}\.[\d\.]*\/\d{1,2}\.',
61
        'Opera',
62
        ' \.NET[\d\.]*',
63
        'cubot',
64
        '; M bot',
65
        '; CRONO',
66
        '; B bot',
67
        '; IDbot',
68
        '; ID bot',
69
        '; POWER BOT',
70
        'OCTOPUS-CORE',
71
    );
72
}
73