Completed
Push — master ( a5b3b8...bdaaad )
by personal
07:39 queued 05:25
created

Result::asArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
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
     * Size of the file
29
     *
30
     * @var integer
31
     */
32
    private $fileSize;
33
34
    /**
35
     * Lines of comments
36
     *
37
     * @var integer
38
     */
39
    private $commentLoc;
40
41
    /**
42
     * Logical Lines of code
43
     *
44
     * @var integer
45
     */
46
    private $logicalLoc;
47
48
    /**
49
     * Complexity cyclomatic
50
     *
51
     * @var integer
52
     */
53
    private $complexityCyclomatic;
54
55
    /**
56
     * @inheritdoc
57
     */
58
    public function asArray() {
59
        return array (
60
            'loc' => $this->getLoc()
61
            ,'logicalLoc' => $this->getLogicalLoc()
62
            ,'fileSize' => $this->getFileSize()
63
        );
64
    }
65
66
    /**
67
     * @param int $complexityCyclomatic
68
     * @return $this
69
     */
70
    public function setComplexityCyclomatic($complexityCyclomatic)
71
    {
72
        $this->complexityCyclomatic = $complexityCyclomatic;
73
        return $this;
74
    }
75
76
    /**
77
     * @return int
78
     */
79
    public function getComplexityCyclomatic()
80
    {
81
        return $this->complexityCyclomatic;
82
    }
83
84
    /**
85
     * @param int $loc
86
     * @return $this
87
     */
88
    public function setLoc($loc)
89
    {
90
        $this->loc = $loc;
91
        return $this;
92
    }
93
94
    /**
95
     * @return int
96
     */
97
    public function getLoc()
98
    {
99
        return $this->loc;
100
    }
101
102
    /**
103
     * @param int $fileSize
104
     * @return $this
105
     */
106
    public function setFileSize($fileSize)
107
    {
108
        $this->fileSize = $fileSize;
109
        return $this;
110
    }
111
112
    /**
113
     * @return int
114
     */
115
    public function getfileSize()
116
    {
117
        return $this->fileSize;
118
    }
119
120
    /**
121
     * @param int $logicalLoc
122
     * @return $this
123
     */
124
    public function setLogicalLoc($logicalLoc)
125
    {
126
        $this->logicalLoc = $logicalLoc;
127
        return $this;
128
    }
129
130
    /**
131
     * @return int
132
     */
133
    public function getLogicalLoc()
134
    {
135
        return $this->logicalLoc;
136
    }
137
138
    /**
139
     * @param int $commentLoc
140
     * @return $this
141
     */
142
    public function setCommentLoc($commentLoc)
143
    {
144
        $this->commentLoc = $commentLoc;
145
        return $this;
146
    }
147
148
    /**
149
     * @return int
150
     */
151
    public function getCommentLoc()
152
    {
153
        return $this->commentLoc;
154
    }
155
}