| Total Complexity | 4 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | final class Registry implements RegistryInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var array|MetadataInterface[] |
||
| 23 | */ |
||
| 24 | private array $metadata = []; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * {@inheritdoc} |
||
| 28 | */ |
||
| 29 | public function get(string $code): MetadataInterface |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | public function add(MetadataInterface $metadata): void |
||
| 42 | { |
||
| 43 | $this->metadata[$metadata->getCode()] = $metadata; |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * {@inheritdoc} |
||
| 48 | */ |
||
| 49 | public function addFromCodeAndConfiguration(string $code, array $configuration): void |
||
| 52 | } |
||
| 53 | } |
||
| 54 |