Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.0261 |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | 10 | public function makeDirectory(FileNode $file, $visibility = null) |
|
24 | { |
||
25 | 10 | $madeDirectory = $file->getFilesystem()->createDir($file->getDirectory(), [ |
|
26 | 10 | 'visibility' => $visibility ?: static::VISIBILITY_PUBLIC, |
|
27 | 10 | ]); |
|
28 | 10 | if (!$madeDirectory) { |
|
29 | throw new MakeDirectoryFailedException($file, error_get_last()['message']); |
||
30 | } |
||
31 | |||
32 | 10 | return $file; |
|
33 | } |
||
34 | } |
||
35 |