Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.032 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
42 | 14 | public function getContentsOfFileInWorkingDirectory(string $file): string |
|
43 | { |
||
44 | 14 | $path = $this->workingDir.'/'.$file; |
|
45 | 14 | if (!is_readable($path)) { |
|
46 | throw new InvalidArgumentException("File '$file' must be readable from path '{$this->workingDir}'."); |
||
47 | } |
||
48 | |||
49 | 14 | return file_get_contents($path); |
|
50 | } |
||
51 | |||
62 |