| Conditions | 3 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | 9 | public function makeDirectory(FileNode $file, $visibility = null) |
|
| 35 | { |
||
| 36 | 9 | $madeDirectory = $file->getFilesystem()->createDir($file->getDirectory(), [ |
|
| 37 | 9 | 'visibility' => $visibility ?: static::VISIBILITY_PUBLIC, |
|
| 38 | ]); |
||
| 39 | 9 | if (!$madeDirectory) { |
|
| 40 | 1 | throw new MakeDirectoryFailedException($file, error_get_last()['message']); |
|
| 41 | } |
||
| 42 | |||
| 43 | 8 | return $file; |
|
| 44 | } |
||
| 45 | } |
||
| 46 |