public function getProjectRoot()
{
if (!isset(self::$projectRoot)) {
$this->debug('Finding the project root based on the CWD');
self::$projectRoot = $this->localProject->getProjectRoot();
$this->debug(self::$projectRoot ? 'Project root found: ' . self::$projectRoot : 'Project root not found');
}
return self::$projectRoot;
}
/** * Get a list of application names in the local project. * * @return string[] */ public function getAppNames() { $apps = []; if ($projectRoot = $this->welcomeCommand->getProjectRoot()) { foreach (LocalApplication::getApplications($projectRoot) as $app) { $name = $app->getName(); if ($name !== null) { $apps[] = $name; } } } return $apps; }