| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function readFile(FileInterface $file, FileSystemHandlerInterface $fileSystemHandler) |
||
| 16 | { |
||
| 17 | if (!$fileSystemHandler->isReadable($file->getPath())) { |
||
| 18 | throw new IOException("Error, can't read the file. The file not exist or is not readable."); |
||
| 19 | } |
||
| 20 | |||
| 21 | $file->setRawContent($fileSystemHandler->read($file->getPath())); |
||
| 22 | } |
||
| 23 | } |
||
| 24 |