| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function getTargetDir($index) |
||
| 20 | { |
||
| 21 | $targetDir = "{$this->local}/{$index}/conf"; |
||
| 22 | |||
| 23 | if (!is_dir($targetDir)) { |
||
| 24 | $worked = @mkdir($targetDir, 0770, true); |
||
| 25 | |||
| 26 | if (!$worked) { |
||
| 27 | throw new \RuntimeException( |
||
| 28 | sprintf('Failed creating target directory %s, please check permissions', $targetDir) |
||
| 29 | ); |
||
| 30 | } |
||
| 31 | } |
||
| 32 | |||
| 33 | return $targetDir; |
||
| 34 | } |
||
| 53 |