protected function getSelectedProject() { if (!$this->project) { throw new \BadMethodCallException('No project selected'); } return $this->project; }