1 | <?php |
||
19 | class ResultSet implements ExportableInterface, ResultSetInterface { |
||
20 | |||
21 | /** |
||
22 | * Filename |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | private $filename; |
||
27 | |||
28 | /** |
||
29 | * Halstead Result |
||
30 | * @var \Hal\Metrics\Complexity\Text\Halstead\Result |
||
31 | */ |
||
32 | private $halstead; |
||
33 | |||
34 | /** |
||
35 | * LOC Result |
||
36 | * |
||
37 | * @var \Hal\Metrics\Complexity\Text\Length\Result |
||
38 | */ |
||
39 | private $loc; |
||
40 | |||
41 | /** |
||
42 | * McCabe Result |
||
43 | * |
||
44 | * @var \Hal\Metrics\Complexity\Component\McCabe\Result |
||
45 | */ |
||
46 | private $mcCabe; |
||
47 | |||
48 | /** |
||
49 | * Myer's interval result |
||
50 | * |
||
51 | * @var \Hal\Metrics\Complexity\Component\Myer\Result |
||
52 | */ |
||
53 | private $myer; |
||
54 | |||
55 | /** |
||
56 | * Maintainability Result |
||
57 | * |
||
58 | * @var \Hal\Metrics\Design\Component\MaintainabilityIndex\Result |
||
59 | */ |
||
60 | private $maintainabilityIndex; |
||
61 | |||
62 | /** |
||
63 | * Coupling |
||
64 | * |
||
65 | * @var \Hal\Metrics\Complexity\Structural\HenryAndKafura\Result |
||
66 | */ |
||
67 | private $coupling; |
||
68 | |||
69 | /** |
||
70 | * Infos about OOP |
||
71 | * |
||
72 | * @var Result |
||
73 | */ |
||
74 | private $oop; |
||
75 | |||
76 | /** |
||
77 | * Lack of cohesion of methods |
||
78 | * |
||
79 | * @var |
||
80 | */ |
||
81 | private $lcom; |
||
82 | |||
83 | /** |
||
84 | * System complexity result |
||
85 | * |
||
86 | * @var \Hal\Metrics\Complexity\Structural\CardAndAgresti\Result |
||
87 | */ |
||
88 | private $systemComplexity; |
||
89 | |||
90 | /** |
||
91 | * Constructor |
||
92 | * |
||
93 | * @param string $filename |
||
94 | */ |
||
95 | public function __construct($filename) { |
||
98 | |||
99 | /** |
||
100 | * @inheritdoc |
||
101 | */ |
||
102 | public function getName() { |
||
105 | |||
106 | /** |
||
107 | * @inheritdoc |
||
108 | */ |
||
109 | public function asArray() { |
||
126 | |||
127 | /** |
||
128 | * @param \Hal\Metrics\Complexity\Text\Halstead\Result $halstead |
||
129 | * @return $this |
||
130 | */ |
||
131 | public function setHalstead(\Hal\Metrics\Complexity\Text\Halstead\Result $halstead) |
||
132 | { |
||
133 | $this->halstead = $halstead; |
||
134 | return $this; |
||
135 | } |
||
136 | |||
137 | /** |
||
138 | * @return \Hal\Metrics\Complexity\Text\Halstead\Result |
||
139 | */ |
||
140 | public function getHalstead() |
||
144 | |||
145 | /** |
||
146 | * @param \Hal\Metrics\Complexity\Text\Length\Result $loc |
||
147 | * @return $this |
||
148 | */ |
||
149 | public function setLoc(\Hal\Metrics\Complexity\Text\Length\Result $loc) |
||
150 | { |
||
151 | $this->loc = $loc; |
||
152 | return $this; |
||
153 | } |
||
154 | |||
155 | /** |
||
156 | * @return \Hal\Metrics\Complexity\Text\Length\Result |
||
157 | */ |
||
158 | public function getLoc() |
||
162 | |||
163 | |||
164 | /** |
||
165 | * @param \Hal\Metrics\Complexity\Component\McCabe\Result $mcCabe |
||
166 | * @return $this |
||
167 | */ |
||
168 | public function setMcCabe(\Hal\Metrics\Complexity\Component\McCabe\Result $mcCabe) |
||
169 | { |
||
170 | $this->mcCabe = $mcCabe; |
||
171 | return $this; |
||
172 | } |
||
173 | |||
174 | /** |
||
175 | * @return \Hal\Metrics\Complexity\Component\McCabe\Result |
||
176 | */ |
||
177 | public function getMcCabe() |
||
181 | |||
182 | /** |
||
183 | * @param \Hal\Metrics\Complexity\Component\Myer\Result $myer |
||
184 | * @return $this |
||
185 | */ |
||
186 | public function setMyer($myer) |
||
191 | |||
192 | /** |
||
193 | * @return \Hal\Metrics\Complexity\Component\Myer\Result |
||
194 | */ |
||
195 | public function getMyer() |
||
196 | { |
||
197 | return $this->myer; |
||
198 | } |
||
199 | |||
200 | /** |
||
201 | * @param \Hal\Metrics\Design\Component\MaintainabilityIndex\Result $maintainabilityIndex |
||
202 | * @return $this |
||
203 | */ |
||
204 | public function setMaintainabilityIndex(\Hal\Metrics\Design\Component\MaintainabilityIndex\Result $maintainabilityIndex) |
||
209 | |||
210 | /** |
||
211 | * @return \Hal\Metrics\Design\Component\MaintainabilityIndex\Result |
||
212 | */ |
||
213 | public function getMaintainabilityIndex() |
||
217 | |||
218 | /** |
||
219 | * Get filename associated to the result set |
||
220 | * |
||
221 | * @return string |
||
222 | */ |
||
223 | public function getFilename() |
||
227 | |||
228 | /** |
||
229 | * @param \Hal\Metrics\Complexity\Structural\HenryAndKafura\Result $coupling |
||
230 | * @return $this |
||
231 | */ |
||
232 | public function setCoupling($coupling) |
||
237 | |||
238 | /** |
||
239 | * @return \Hal\Metrics\Complexity\Structural\HenryAndKafura\Result |
||
240 | */ |
||
241 | public function getCoupling() |
||
245 | |||
246 | /** |
||
247 | * @param \Hal\Component\OOP\Extractor\Result $oop |
||
248 | * @return $this |
||
249 | */ |
||
250 | public function setOop($oop) |
||
255 | |||
256 | /** |
||
257 | * @return \Hal\Component\OOP\Extractor\Result |
||
258 | */ |
||
259 | public function getOop() |
||
263 | |||
264 | /** |
||
265 | * @param \Hal\Metrics\Complexity\Structural\LCOM\Result $lcom |
||
266 | */ |
||
267 | public function setLcom(\Hal\Metrics\Complexity\Structural\LCOM\Result $lcom) |
||
268 | { |
||
269 | $this->lcom = $lcom; |
||
270 | } |
||
271 | |||
272 | /** |
||
273 | * @return \Hal\Metrics\Complexity\Structural\LCOM\Result |
||
274 | */ |
||
275 | public function getLcom() |
||
279 | |||
280 | /** |
||
281 | * @param \Hal\Metrics\Complexity\Structural\CardAndAgresti\Result $systemComplexity |
||
282 | * @return $this |
||
283 | */ |
||
284 | public function setSystemComplexity(\Hal\Metrics\Complexity\Structural\CardAndAgresti\Result $systemComplexity) |
||
285 | { |
||
286 | $this->systemComplexity = $systemComplexity; |
||
287 | return $this; |
||
288 | } |
||
289 | |||
290 | /** |
||
291 | * @return \Hal\Metrics\Complexity\Structural\CardAndAgresti\Result |
||
292 | */ |
||
293 | public function getSystemComplexity() |
||
297 | |||
298 | |||
299 | |||
300 | } |