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