enable($app); echo "Enabled application {$app}\n"; } foreach (new \DirectoryIterator(__DIR__ . '/../apps/') as $file) { if ($file->isDot()) { continue; } if (!file_exists($file->getPathname() . '/.git')) { enableApp($file->getFilename()); } }