| Conditions | 3 |
| Paths | 3 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 51 | public static function getCacheUrl(): string |
||
| 52 | { |
||
| 53 | if (null !== static::$cacheUrl) { |
||
| 54 | return static::$cacheUrl; |
||
| 55 | } |
||
| 56 | |||
| 57 | $cachePath = Environment::getVar(Env::CACHE_BASE_PATH, ''); |
||
| 58 | if (!$cachePath) { |
||
| 59 | return ''; |
||
| 60 | } |
||
| 61 | |||
| 62 | $cacheUrl = sprintf( |
||
| 63 | '%s%s%s', |
||
| 64 | rtrim(static::getMediaUrl(), DIRECTORY_SEPARATOR), |
||
| 65 | DIRECTORY_SEPARATOR, |
||
| 66 | ltrim($cachePath, DIRECTORY_SEPARATOR) |
||
| 67 | ); |
||
| 68 | |||
| 69 | static::$cacheUrl = (string)$cacheUrl; |
||
| 70 | |||
| 71 | return static::$cacheUrl; |
||
| 72 | } |
||
| 74 |