getRealpath(); $fileName = $file->getFilename(); if ($fileName == '..' || !$file->isDir()) { continue; } if (toExclude($excludeDir, $filePath)) { continue; } if (isEmptyDir($filePath)) { $emptyDirectoriesMessage .= color($filePath, 'blue') . PHP_EOL; continue; } if (! file_exists($filePath . '/index.php')) { $missingIndexMessage .= color($filePath, 'blue') . PHP_EOL; if ($fixIndex) { $projectFolder = str_replace('doc', '', dirname(__DIR__)); $path = str_replace($projectFolder, '', $filePath); $path = str_replace('-', '', $path); $indexPath = preg_replace('/(\w+)/', '../', $path); $indexPath = str_replace('//', '/', $indexPath); $indexContent = '