1 | <?php |
||
18 | class Result implements ExportableInterface { |
||
19 | |||
20 | /** |
||
21 | * Cyclomatic result |
||
22 | * |
||
23 | * @var \Hal\Metrics\Complexity\Component\McCabe\Result |
||
24 | */ |
||
25 | private $mcCabe; |
||
26 | |||
27 | /** |
||
28 | * Number of operators |
||
29 | * @var int |
||
30 | */ |
||
31 | private $numberOfOperators = 0; |
||
32 | |||
33 | /** |
||
34 | * @inheritdoc |
||
35 | */ |
||
36 | public function asArray() { |
||
44 | |||
45 | /** |
||
46 | * Get distance (absolute interval) in Myer's interval |
||
47 | * |
||
48 | * @return number |
||
49 | */ |
||
50 | public function getDistance() { |
||
53 | |||
54 | /** |
||
55 | * Get Myer's interval |
||
56 | * |
||
57 | * @return string |
||
58 | */ |
||
59 | public function getInterval() { |
||
62 | |||
63 | /** |
||
64 | * get the cyclomatic complexity number |
||
65 | * |
||
66 | * @return int |
||
67 | */ |
||
68 | public function getCyclomaticComplexityNumber() { |
||
71 | |||
72 | /** |
||
73 | * Set McCabe result |
||
74 | * |
||
75 | * @param \Hal\Metrics\Complexity\Component\McCabe\Result $mcCabe |
||
76 | * @return $this |
||
77 | */ |
||
78 | public function setMcCabe(\Hal\Metrics\Complexity\Component\McCabe\Result $mcCabe) |
||
83 | |||
84 | /** |
||
85 | * Set number of operators |
||
86 | * |
||
87 | * @param integer $numberOfOperators |
||
88 | * @return $this |
||
89 | */ |
||
90 | public function setNumberOfOperators($numberOfOperators) |
||
95 | |||
96 | /** |
||
97 | * Get number of operators |
||
98 | * |
||
99 | * @return int |
||
100 | */ |
||
101 | public function getNumberOfOperators() |
||
105 | } |