| Total Complexity | 7 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Coverage | 80% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class CommandLoader implements CommandLoaderInterface |
||
| 13 | { |
||
| 14 | private ContainerInterface $container; |
||
| 15 | private array $commandMap; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param array $commandMap An array with command names as keys and service ids as values |
||
| 19 | */ |
||
| 20 | 31 | public function __construct(ContainerInterface $container, array $commandMap) |
|
| 21 | { |
||
| 22 | 31 | $this->container = $container; |
|
| 23 | 31 | $this->commandMap = $commandMap; |
|
| 24 | 31 | } |
|
| 25 | |||
| 26 | /** |
||
| 27 | * {@inheritdoc} |
||
| 28 | */ |
||
| 29 | 8 | public function get(string $name) |
|
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * {@inheritdoc} |
||
| 46 | */ |
||
| 47 | 8 | public function has(string $name) |
|
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * {@inheritdoc} |
||
| 54 | */ |
||
| 55 | public function getNames() |
||
| 58 | } |
||
| 59 | } |
||
| 60 |