| Total Complexity | 7 |
| Total Lines | 62 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class Routes |
||
| 11 | { |
||
| 12 | /** @var string|null */ |
||
| 13 | protected static $mediaUrl; |
||
| 14 | |||
| 15 | /** @var string|null */ |
||
| 16 | protected static $cacheUrl; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param string $mediaUrl |
||
| 20 | */ |
||
| 21 | public static function setMediaUrl(string $mediaUrl): void |
||
| 22 | { |
||
| 23 | static::$mediaUrl = $mediaUrl; |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @return string |
||
| 28 | */ |
||
| 29 | public static function getMediaUrl(): string |
||
| 30 | { |
||
| 31 | if (null !== static::$mediaUrl) { |
||
| 32 | return static::$mediaUrl; |
||
| 33 | } |
||
| 34 | |||
| 35 | static::$mediaUrl = (string)Environment::getVar(Env::MEDIA_BASE_URL); |
||
| 36 | |||
| 37 | return static::$mediaUrl; |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param string $cacheUrl |
||
| 42 | */ |
||
| 43 | public static function setCacheUrl(string $cacheUrl): void |
||
| 44 | { |
||
| 45 | static::$cacheUrl = $cacheUrl; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return string |
||
| 50 | */ |
||
| 51 | public static function getCacheUrl(): string |
||
| 72 | } |
||
| 73 | } |
||
| 74 |