| 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 |
||
| 31 | 10 | public function canUse($source): bool |
|
| 32 | { |
||
| 33 | 10 | if (!$this->hasDependencies()) { |
|
| 34 | 1 | return false; |
|
| 35 | } |
||
| 36 | 9 | if (!is_string($source)) { |
|
| 37 | 3 | return false; |
|
| 38 | } |
||
| 39 | 7 | $path = realpath($source); |
|
| 40 | 7 | if (false === $path) { |
|
| 41 | 3 | return false; |
|
| 42 | } |
||
| 43 | 4 | $this->startPath = $path; |
|
| 44 | 4 | return true; |
|
| 45 | } |
||
| 59 |