Conditions | 5 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
27 | private function getTargetDir() |
||
28 | { |
||
29 | if (null === $this->pathToProjectRoot) { |
||
30 | throw new \RuntimeException('You must set the project root path before running this process'); |
||
31 | } |
||
32 | $targetDir = $this->pathToProjectRoot . '/.phpstorm.meta.php'; |
||
33 | if (!is_dir($targetDir) && mkdir($targetDir, 0777, true) && !is_dir($targetDir)) { |
||
34 | throw new \RuntimeException('Failed making targetDir ' . $targetDir); |
||
35 | } |
||
36 | |||
37 | return realpath($targetDir); |
||
38 | } |
||
57 |