1 | <?php declare(strict_types = 1); |
||
8 | class Result implements Arrayable |
||
9 | { |
||
10 | /** |
||
11 | * The file property. |
||
12 | * @var string |
||
13 | */ |
||
14 | private $file; |
||
15 | |||
16 | /** |
||
17 | * The commits property. |
||
18 | * @var integer |
||
19 | */ |
||
20 | private $commits; |
||
21 | |||
22 | /** |
||
23 | * The complexity property. |
||
24 | * @var integer |
||
25 | */ |
||
26 | private $complexity; |
||
27 | |||
28 | /** |
||
29 | * Class constructor. |
||
30 | * @param array $data Data to store in the object. |
||
31 | */ |
||
32 | public function __construct(array $data) |
||
38 | |||
39 | /** |
||
40 | * Get the file property. |
||
41 | * @return string |
||
42 | */ |
||
43 | public function getFile(): string |
||
47 | |||
48 | /** |
||
49 | * Get the file property. |
||
50 | * @return integer |
||
51 | */ |
||
52 | public function getCommits(): int |
||
56 | |||
57 | /** |
||
58 | * Get the file property. |
||
59 | * @return integer |
||
60 | */ |
||
61 | public function getComplexity(): int |
||
65 | |||
66 | /** |
||
67 | * Calculate the score. |
||
68 | * @return float |
||
69 | */ |
||
70 | public function getScore(int $maxCommits, int $maxComplexity): float |
||
105 | |||
106 | /** |
||
107 | * Output results to an array. |
||
108 | * @return array |
||
109 | */ |
||
110 | public function toArray(): array |
||
118 | } |
||
119 |