| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function writeFile(FileInterface $file, FileSystemHandlerInterface $fileSystemHandler) |
||
| 14 | { |
||
| 15 | if (!$fileSystemHandler->isWritable($file->getPath())) { |
||
| 16 | throw new IOException("Error, can't write to the file. The file not exists or is not writable."); |
||
| 17 | } |
||
| 18 | |||
| 19 | $fileSystemHandler->write($file->getPath(), $file->getRawContent()); |
||
| 20 | } |
||
| 21 | } |
||
| 22 |