Conditions | 5 |
Paths | 6 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | protected function makeDirectoryStructure(array $directories, Output $output = null) |
||
19 | { |
||
20 | $createdDirs = 0; |
||
21 | |||
22 | foreach ($directories as $key => $directory) { |
||
23 | if (!file_exists($directory)) { |
||
24 | if (mkdir($directory)) { |
||
25 | $createdDirs++; |
||
26 | } |
||
27 | |||
28 | if ($output) { |
||
29 | $output->writeInfo("Created {$key} directory."); |
||
30 | } |
||
31 | } |
||
32 | } |
||
33 | |||
34 | return $createdDirs; |
||
35 | } |
||
36 | |||
54 |