Total Complexity | 5 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | abstract class AbstractCommand extends Command |
||
26 | { |
||
27 | protected int $statusCode = 0; |
||
28 | protected Runtime $runtime; |
||
29 | |||
30 | /** |
||
31 | * Set the Runtime configuration |
||
32 | */ |
||
33 | 63 | public function setRuntime(Runtime $runtime): self |
|
37 | } |
||
38 | |||
39 | /** |
||
40 | * Logs a message |
||
41 | */ |
||
42 | 46 | public function log(string $message, string $level = LogLevel::DEBUG): void |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * Get the Human friendly Stage name |
||
49 | */ |
||
50 | 40 | protected function getStageName(): string |
|
51 | { |
||
52 | 40 | $utils = new Utils(); |
|
53 | 40 | return $utils->getStageName($this->runtime->getStage()); |
|
|
|||
54 | } |
||
55 | |||
56 | /** |
||
57 | * Requires the configuration to be loaded |
||
58 | */ |
||
59 | 57 | protected function requireConfig(): void |
|
64 | } |
||
65 | } |
||
67 |