1 | <?php declare(strict_types = 1); |
||
6 | class Config |
||
7 | { |
||
8 | /** |
||
9 | * The number of files to display in the results table. |
||
10 | * @var integer |
||
11 | */ |
||
12 | private $filesToShow; |
||
13 | |||
14 | /** |
||
15 | * The number of parallel jobs to use to process the files. |
||
16 | * @var integer |
||
17 | */ |
||
18 | private $parallelJobs; |
||
19 | |||
20 | /** |
||
21 | * How far back in the git history to go to count commits. |
||
22 | * @var string |
||
23 | */ |
||
24 | private $commitsSince; |
||
25 | |||
26 | /** |
||
27 | * The paths to files to ignore when processing. |
||
28 | * @var array |
||
29 | */ |
||
30 | private $filesToIgnore; |
||
31 | |||
32 | /** |
||
33 | * The math formula to calculate the score |
||
34 | * @var string |
||
35 | */ |
||
36 | private $formula; |
||
37 | |||
38 | /** |
||
39 | * Config constructor. |
||
40 | * @param array $rawData Raw config data. |
||
41 | */ |
||
42 | public function __construct(array $rawData = []) |
||
50 | |||
51 | /** |
||
52 | * Get the number of files to display in the results table. |
||
53 | * @return integer |
||
54 | */ |
||
55 | public function getFilesToShow(): int |
||
59 | |||
60 | /** |
||
61 | * Get the number of parallel jobs to use to process the files. |
||
62 | * @return integer |
||
63 | */ |
||
64 | public function getParallelJobs(): int |
||
68 | |||
69 | /** |
||
70 | * Get how far back in the git history to go to count commits. |
||
71 | * @return string |
||
72 | */ |
||
73 | public function getCommitsSince(): string |
||
77 | |||
78 | /** |
||
79 | * Get the paths to files to ignore when processing. |
||
80 | * @return array |
||
81 | */ |
||
82 | public function getFilesToIgnore(): array |
||
86 | |||
87 | /** |
||
88 | * Get the formula to calculate the score |
||
89 | * @return string |
||
90 | */ |
||
91 | public function getFormula(): string |
||
95 | } |
||
96 |