| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | final class StorageRegistry |
||
| 9 | { |
||
| 10 | /** @var array MetricStorageInterface[] */ |
||
| 11 | private $storages = []; |
||
| 12 | |||
| 13 | 1 | public function register(string $name, MetricStorageInterface $storage): void |
|
| 14 | { |
||
| 15 | 1 | $this->storages[$name] = $storage; |
|
| 16 | 1 | } |
|
| 17 | |||
| 18 | /** |
||
| 19 | * @param string $name |
||
| 20 | * |
||
| 21 | * @return MetricStorageInterface |
||
| 22 | * |
||
| 23 | * @throws \OutOfBoundsException |
||
| 24 | */ |
||
| 25 | 2 | public function getStorage(string $name): MetricStorageInterface |
|
| 32 | } |
||
| 33 | } |
||
| 34 |