1 | <?php declare(strict_types = 1); |
||
7 | class GitCommitCountAssessor |
||
8 | { |
||
9 | /** |
||
10 | * The command service. |
||
11 | * @var CommandService |
||
12 | */ |
||
13 | protected $commandService; |
||
14 | |||
15 | /** |
||
16 | * Class constructor. |
||
17 | * @param CommandService $commandService Command Service. |
||
18 | */ |
||
19 | public function __construct(CommandService $commandService) |
||
23 | |||
24 | /** |
||
25 | * See how many commits the file at $filePath has. |
||
26 | * @param string $filePath Path and filename. |
||
27 | * @return integer |
||
28 | */ |
||
29 | public function assess($filePath): int |
||
41 | |||
42 | /** |
||
43 | * Build the command to get the number of commits for the file at $filePath. |
||
44 | * @param string $filePath Patha nd filename. |
||
45 | * @return string |
||
46 | */ |
||
47 | protected function buildCommand($filePath): string |
||
59 | } |
||
60 |