Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
33 | 10 | public function canUse($source): bool |
|
34 | { |
||
35 | 10 | if (!$this->hasDependencies()) { |
|
36 | 1 | return false; |
|
37 | } |
||
38 | 9 | if (!is_string($source)) { |
|
39 | 3 | return false; |
|
40 | } |
||
41 | 7 | $path = realpath($source); |
|
42 | 7 | if (false === $path) { |
|
43 | 3 | return false; |
|
44 | } |
||
45 | 4 | $this->startPath = $path; |
|
46 | 4 | return true; |
|
47 | } |
||
61 |