| Total Complexity | 5 | 
| Total Lines | 27 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 11 | final class Installer | ||
| 12 | { | ||
| 13 | /** | ||
| 14 | * @psalm-suppress UndefinedClass | ||
| 15 | */ | ||
| 16 | public static function postUpdate(): void | ||
| 17 |     { | ||
| 18 |         self::chmodRecursive('runtime', 0777); | ||
| 19 |         self::chmodRecursive('public/assets', 0777); | ||
| 20 | } | ||
| 21 | |||
| 22 | private static function chmodRecursive(string $path, int $mode): void | ||
| 23 |     { | ||
| 24 | chmod($path, $mode); | ||
| 25 | $iterator = new RIterator( | ||
| 26 | new DirIterator($path, FSIterator::SKIP_DOTS | FSIterator::CURRENT_AS_PATHNAME), | ||
| 27 | RIterator::SELF_FIRST | ||
| 28 | ); | ||
| 29 |         foreach ($iterator as $item) { | ||
| 30 | chmod($item, $mode); | ||
| 31 | } | ||
| 32 | } | ||
| 33 | |||
| 34 | public static function copyEnvFile(): void | ||
| 38 | } | ||
| 39 | } | ||
| 40 | } | ||
| 41 |