Completed
Push — master ( f91003...7ec665 )
by personal
05:42 queued 03:06
created

DefaultRuleSet   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 23
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A asArray() 0 17 1
1
<?php
2
3
/*
4
 * (c) Jean-François Lépine <https://twitter.com/Halleck45>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Hal\Application\Rule;
11
use Hal\Component\Result\ExportableInterface;
12
13
14
/**
15
 * Rules
16
 *
17
 * @author Jean-François Lépine <https://twitter.com/Halleck45>
18
 */
19
class DefaultRuleSet implements ExportableInterface {
20
21
    /**
22
     * @inheritdoc
23
     */
24
    public function asArray() {
25
        return array(
26
            'cyclomaticComplexity' => array(10, 6, 2)
27
            , 'maintainabilityIndex' => array(0, 69, 85)
28
            , 'logicalLoc' => array(800, 400, 200)
29
            , 'volume' => array(1300, 1000, 300)
30
            , 'bugs' => array(0.35, 0.25, 0.15)
31
            , 'commentWeight' => array(36, 38, 41)
32
            , 'vocabulary' => array(51, 34, 27)
33
            , 'difficulty' => array(18, 15, 5.8)
34
            , 'instability' => array(1, .95, .45)
35
            , 'afferentCoupling' => array(20, 15, 9)
36
            , 'efferentCoupling' => array(15, 11, 7)
37
            , 'myerDistance' => array(10, 5, 2)
38
            , 'lcom' => array(3, 2, 1.5)
39
        );
40
    }
41
}