| Total Complexity | 4 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | class Path |
||
| 27 | { |
||
| 28 | protected string $documentRoot = ''; // document root as set from server |
||
| 29 | protected string $pathToSystemRoot = ''; // because document root could not be every time that dir in which are user data dir |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param string $documentRoot |
||
| 33 | * @throws PathsException |
||
| 34 | * @return $this |
||
| 35 | */ |
||
| 36 | 2 | public function setDocumentRoot(string $documentRoot): self |
|
| 40 | } |
||
| 41 | |||
| 42 | 1 | public function getDocumentRoot(): string |
|
| 43 | { |
||
| 44 | 1 | return $this->documentRoot; |
|
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @param string $pathToSystemRoot |
||
| 49 | * @throws PathsException |
||
| 50 | * @return $this |
||
| 51 | */ |
||
| 52 | 2 | public function setPathToSystemRoot(string $pathToSystemRoot): self |
|
| 53 | { |
||
| 54 | 2 | $this->pathToSystemRoot = Stuff::arrayToPath(Stuff::linkToArray($pathToSystemRoot)); |
|
| 55 | 2 | return $this; |
|
| 56 | } |
||
| 57 | |||
| 58 | 1 | public function getPathToSystemRoot(): string |
|
| 61 | } |
||
| 62 | } |
||
| 63 |