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;
    }