Total Complexity | 3 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Coverage | 91.67% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class CommandRepository |
||
10 | { |
||
11 | /** |
||
12 | 7 | * @var array<string, ConsoleCommand> |
|
13 | */ |
||
14 | 7 | protected $commands; |
|
15 | 7 | ||
16 | 7 | public function __construct() |
|
24 | ]; |
||
25 | } |
||
26 | |||
27 | public function getRegisteredCommand(string $name): ConsoleCommand |
||
28 | 7 | { |
|
29 | return $this->commands[$name]; |
||
30 | 7 | } |
|
31 | |||
32 | /** |
||
33 | * Return all registered commands. |
||
34 | * |
||
35 | * @return array<string, ConsoleCommand> |
||
36 | */ |
||
37 | public function getRegisteredCommands(): array |
||
40 | } |
||
41 | } |
||
42 |