Conditions | 6 |
Paths | 4 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
55 | 45 | protected function findAbsolutePath($path) |
|
56 | { |
||
57 | 45 | if (is_file($path) || is_dir($path)) { |
|
58 | 42 | return realpath($path); |
|
59 | } |
||
60 | |||
61 | 6 | if (null === $this->basePath) { |
|
62 | 4 | return false; |
|
63 | } |
||
64 | |||
65 | 3 | if (is_file($this->basePath . DIRECTORY_SEPARATOR . $path) |
|
66 | 3 | || is_dir($this->basePath . DIRECTORY_SEPARATOR . $path)) { |
|
67 | 3 | return realpath($this->basePath . DIRECTORY_SEPARATOR . $path); |
|
68 | } |
||
69 | |||
70 | 1 | return false; |
|
71 | } |
||
72 | } |
||
73 |