Passed
Push — master ( 6430b0...75a93c )
by Rob
02:21
created

BaseOptions::isYamlLoaded()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 0
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace devtoolboxuk\cerberus;
4
5
class BaseOptions
6
{
7
8 4
    public function getOptions()
9
    {
10 4
        return [
11
            'Detection' => [
12
                'Rules' => [
13
                    'BotBlock' => [
14
                        'active' => 1,
15 4
                        'score' => 1,
16
                        'params' => '360Spider'
17
                    ],
18
                    'Html' => [
19
                        'active' => 1,
20
                        'score' => 1,
21
                        'params' => '',
22
                    ],
23
                    'StringLength' => [
24
                        'active' => 1,
25
                        'score' => 1,
26
                        'params' => '',
27
                    ],
28
                    'Numeric' => [
29
                        'active' => 1,
30
                        'score' => 1,
31
                        'params' => '',
32
                    ],
33
                    'Url' => [
34
                        'active' => 1,
35
                        'score' => 1,
36
                        'params' => '',
37
                    ],
38
                    'Ip' => [
39
                        'active' => 1,
40
                        'score' => 1,
41
                        'params' => '',
42
                    ],
43
                    'Tor' => [
44
                        'active' => 1,
45
                        'score' => 1,
46
                        'params' => '',
47
                    ],
48
                    'DisposableEmail' => [
49
                        'active' => 1,
50
                        'score' => 10,
51
                        'params' => '',
52
                    ],
53
                    'InvalidEmail' => [
54
                        'active' => 1,
55
                        'score' => 1,
56
                        'params' => '',
57
                    ],
58
                    'QueryStringKey' => [
59
                        'active' => 1,
60
                        'score' => 1,
61
                        'params' => '',
62
                    ],
63
                    'QueryStringValue' => [
64
                        'active' => 1,
65
                        'score' => 1,
66
                        'params' => '',
67
                    ],
68
                    'DifferentCountry' => [
69
                        'active' => 1,
70
                        'score' => 10,
71
                        'params' => '',
72
                    ],
73
                    'Country' => [
74
                        'active' => 1,
75
                        'score' => 10,
76
                        'params' => '',
77
                    ],
78
                    'Xss' => [
79 4
                        'active' => 1,
80
                        'score' => 10,
81 4
                        'params' => '',
82
                    ]
83
                ]
84
            ]
85
86
        ];
87
88
    }
89
90
    private function isYamlLoaded()
91
    {
92
        return extension_loaded('yaml');
93
    }
94
}