| Total Complexity | 7 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | abstract class Environment implements CompositePathInterface |
||
| 10 | { |
||
| 11 | protected string $url; |
||
| 12 | |||
| 13 | protected function __construct(string $url) |
||
| 16 | } |
||
| 17 | |||
| 18 | protected function getBaseUrl(): string |
||
| 19 | { |
||
| 20 | return $this->url; |
||
| 21 | } |
||
| 22 | |||
| 23 | protected function getUrlPath(string $path): string |
||
| 24 | { |
||
| 25 | return implode(PathUtil::PATH_SEPARATOR, [$this->getBaseUrl(), ltrim($path, PathUtil::PATH_SEPARATOR)]); |
||
| 26 | } |
||
| 27 | |||
| 28 | // |
||
| 29 | |||
| 30 | public function setParent(?CompositePathInterface $parent): void |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getParent(): ?CompositePathInterface |
||
| 36 | { |
||
| 37 | return null; |
||
| 38 | } |
||
| 39 | |||
| 40 | public function joinPath(string $relative): string |
||
| 41 | { |
||
| 42 | return $this->getUrlPath($relative); |
||
| 43 | } |
||
| 44 | |||
| 45 | public function getPath(): string |
||
| 48 | } |
||
| 49 | } |
||
| 50 |