Completed
Push — master ( 56ea51...11e69c )
by Rob
04:30 queued 10s
created

BaseOptions   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 88
Duplicated Lines 0 %

Test Coverage

Coverage 83.33%

Importance

Changes 0
Metric Value
eloc 61
dl 0
loc 88
ccs 5
cts 6
cp 0.8333
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
B getOptions() 0 74 1
A isYamlLoaded() 0 3 1
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()
0 ignored issues
show
Unused Code introduced by
The method isYamlLoaded() is not used, and could be removed.

This check looks for private methods that have been defined, but are not used inside the class.

Loading history...
91
    {
92
        return extension_loaded('yaml');
93
    }
94
}