Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | public function toAbsolutePath(string $workingDirectory): PathHelper |
||
32 | { |
||
33 | $real = realpath($workingDirectory . DIRECTORY_SEPARATOR . $this->path); |
||
34 | if ($real === false) { |
||
35 | throw new InvalidArgumentException( |
||
36 | sprintf('Cannot resolve absolute path to %s.', $this->path) |
||
37 | ); |
||
38 | } |
||
39 | |||
40 | return new PathHelper($real); |
||
41 | } |
||
52 |