Total Complexity | 5 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
5 | class PathResolver |
||
6 | { |
||
7 | /** @var string */ |
||
8 | private $relativePath; |
||
9 | |||
10 | public function __construct(string $relativePath = '') |
||
11 | { |
||
12 | $this->relativePath = $relativePath; |
||
13 | } |
||
14 | |||
15 | public function getRelativePath(): string |
||
16 | { |
||
17 | return $this->relativePath; |
||
18 | } |
||
19 | |||
20 | public function setRelativePath(string $relativePath) |
||
21 | { |
||
22 | $this->relativePath = '/' . trim($relativePath, '/'); |
||
23 | } |
||
24 | |||
25 | public function obtainPath($location): string |
||
33 | } |
||
34 | } |
||
35 |