| Total Complexity | 4 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class AliasHelper |
||
| 6 | { |
||
| 7 | |||
| 8 | protected static $aliasService; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @param string $alias |
||
| 12 | * @param string $value |
||
| 13 | * |
||
| 14 | * @throws \Exception |
||
| 15 | */ |
||
| 16 | public static function setAlias(string $alias, string $value) |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param $alias |
||
| 23 | * @param bool $throwException |
||
| 24 | * |
||
| 25 | * @return string|null |
||
| 26 | * @throws \Exception |
||
| 27 | */ |
||
| 28 | public static function get($alias, $throwException = true) |
||
| 29 | { |
||
| 30 | return self::getInstance()->get($alias, $throwException); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param AliasService $service |
||
| 35 | */ |
||
| 36 | public static function setInstance(AliasService $service) |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return AliasService |
||
| 43 | * @throws \WebComplete\core\utils\alias\AliasException |
||
| 44 | */ |
||
| 45 | protected static function getInstance(): AliasService |
||
| 50 |