protected function getProject()
    {
        if (!$this->projects) {
            return false;
        }

        $commandLine = $this->handler->getContext()
            ->getCommandLine();
        $currentProjectId = $this->getProjectIdFromCommandLine($commandLine);
        if (!$currentProjectId && ($currentProject = $this->getWelcomeCommand()->getCurrentProject())) {
            return $currentProject;
        } elseif (isset($this->projects[$currentProjectId])) {
            return $this->projects[$currentProjectId];
        }

        return false;
    }
protected function getProject()
    {
        if (!$this->projects) {
            return false;
        }

        $commandLine = $this->handler->getContext()
            ->getCommandLine();
        $currentProjectId = $this->getProjectIdFromCommandLine($commandLine);
        if (!$currentProjectId && ($currentProject = $this->getWelcomeCommand()->getCurrentProject())) {
            return $currentProject;
        } elseif (isset($this->projects[$currentProjectId])) {
            return $this->projects[$currentProjectId];
        }

        return false;
    }
protected function getProject ( ) { if ( ! $ this -> projects ) { return false ; } $ commandLine = $ this -> handler -> getContext ( ) -> getCommandLine ( ) ; $ currentProjectId = $ this -> getProjectIdFromCommandLine ( $ commandLine ) ; if ( ! $ currentProjectId && ( $ currentProject = $ this -> getWelcomeCommand ( ) -> getCurrentProject ( ) ) ) { return $ currentProject ; } elseif ( isset ( $ this -> projects [ $ currentProjectId ] ) ) { return $ this -> projects [ $ currentProjectId ] ; } return false ; }
Get the preferred project for autocompletion.

The project is either defined by an ID that the user has specified in
the command (via the 'project' argument or '--project' option), or it is
determined from the current path.

@return \Platformsh\Client\Model\Project|false
Get the preferred project for autocompletion .