Total Complexity | 3 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | final class DefaultServiceContainerRegistry implements ServiceContainerRegistry |
||
11 | { |
||
12 | /** |
||
13 | * @param array<string, \Inspirum\Balikobot\Service\Registry\ServiceContainer> $containers |
||
14 | */ |
||
15 | 5 | public function __construct( |
|
16 | private array $containers = [], |
||
17 | private string $defaultConnectionName = 'default', |
||
18 | ) { |
||
19 | 5 | } |
|
20 | |||
21 | 1 | public function add(string $connection, ServiceContainer $container): void |
|
22 | { |
||
23 | 1 | $this->containers[$connection] = $container; |
|
24 | } |
||
25 | |||
26 | 5 | public function get(?string $connection = null): ServiceContainer |
|
31 | } |
||
32 | } |
||
33 |