/**
  * Get a list of environment IDs.
  *
  * The project is either defined by an ID that the user has specified in
  * the command (via the 'id' argument of 'get', or the '--project' option),
  * or it is determined from the current path.
  *
  * @return string[]
  */
 public function getEnvironments()
 {
     if (!$this->projects) {
         return array();
     }
     $commandLine = $this->handler->getContext()->getCommandLine();
     $currentProjectId = $this->getProjectIdFromCommandLine($commandLine);
     if (!$currentProjectId && ($currentProject = $this->platformCommand->getCurrentProject())) {
         $project = $currentProject;
     } elseif (isset($this->projects[$currentProjectId])) {
         $project = $this->projects[$currentProjectId];
     } else {
         return array();
     }
     $environments = $this->platformCommand->getEnvironments($project, false, false);
     return array_keys($environments);
 }