Result::setLoc()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 5
rs 9.4286
cc 1
eloc 3
nc 1
nop 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\Metrics\Complexity\Text\Length;
11
use Hal\Component\Result\ExportableInterface;
12
13
/**
14
 * Representation of LOC
15
 *
16
 * @author Jean-François Lépine <https://twitter.com/Halleck45>
17
 */
18
class Result implements ExportableInterface {
19
20
    /**
21
     * Lines of code
22
     *
23
     * @var integer
24
     */
25
    private $loc;
26
27
    /**
28
     * Lines of comments
29
     *
30
     * @var integer
31
     */
32
    private $commentLoc;
33
34
    /**
35
     * Logical Lines of code
36
     *
37
     * @var integer
38
     */
39
    private $logicalLoc;
40
41
    /**
42
     * Complexity cyclomatic
43
     *
44
     * @var integer
45
     */
46
    private $complexityCyclomatic;
47
48
    /**
49
     * @inheritdoc
50
     */
51
    public function asArray() {
52
        return array (
53
            'loc' => $this->getLoc()
54
            ,'logicalLoc' => $this->getLogicalLoc()
55
        );
56
    }
57
58
    /**
59
     * @param int $complexityCyclomatic
60
     * @return $this
61
     */
62
    public function setComplexityCyclomatic($complexityCyclomatic)
63
    {
64
        $this->complexityCyclomatic = $complexityCyclomatic;
65
        return $this;
66
    }
67
68
    /**
69
     * @return int
70
     */
71
    public function getComplexityCyclomatic()
72
    {
73
        return $this->complexityCyclomatic;
74
    }
75
76
    /**
77
     * @param int $loc
78
     * @return $this
79
     */
80
    public function setLoc($loc)
81
    {
82
        $this->loc = $loc;
83
        return $this;
84
    }
85
86
    /**
87
     * @return int
88
     */
89
    public function getLoc()
90
    {
91
        return $this->loc;
92
    }
93
94
    /**
95
     * @param int $logicalLoc
96
     * @return $this
97
     */
98
    public function setLogicalLoc($logicalLoc)
99
    {
100
        $this->logicalLoc = $logicalLoc;
101
        return $this;
102
    }
103
104
    /**
105
     * @return int
106
     */
107
    public function getLogicalLoc()
108
    {
109
        return $this->logicalLoc;
110
    }
111
112
    /**
113
     * @param int $commentLoc
114
     * @return $this
115
     */
116
    public function setCommentLoc($commentLoc)
117
    {
118
        $this->commentLoc = $commentLoc;
119
        return $this;
120
    }
121
122
    /**
123
     * @return int
124
     */
125
    public function getCommentLoc()
126
    {
127
        return $this->commentLoc;
128
    }
129
}