| Total Complexity | 4 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | class AliasRegistry { |
||
| 7 | /** @var string[] */ |
||
| 8 | private array $aliases = []; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @param string $alias |
||
| 12 | * @param string $string |
||
| 13 | * @return $this |
||
| 14 | */ |
||
| 15 | public function add(string $alias, string $string): self { |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param string $alias |
||
| 22 | * @return string |
||
| 23 | */ |
||
| 24 | public function get(string $alias): string { |
||
| 25 | if (!array_key_exists($alias, $this->aliases)) { |
||
| 26 | throw new RuntimeException("Alias not found: {$alias}"); |
||
| 27 | } |
||
| 28 | return $this->aliases[$alias]; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return string[] |
||
| 33 | */ |
||
| 34 | public function getAll(): array { |
||
| 36 | } |
||
| 37 | } |
||
| 38 |