Total Complexity | 5 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | class Directory |
||
25 | { |
||
26 | /** @var string */ |
||
27 | private $directory; |
||
28 | |||
29 | public function __construct(string $directory) |
||
30 | { |
||
31 | $this->ensureIsDirectory($directory); |
||
32 | $this->directory = rtrim($directory, \DIRECTORY_SEPARATOR); |
||
33 | } |
||
34 | |||
35 | public function asString(): string |
||
36 | { |
||
37 | return $this->directory; |
||
38 | } |
||
39 | |||
40 | public function getFullSubpathAsString(string $subPath): string |
||
43 | } |
||
44 | |||
45 | private function ensureIsDirectory(string $directory): void |
||
52 |