/** * @param string $retType * @return array|Project * @throws \RuntimeException */ public function getProject($retType = "array") { if (empty($this->project)) { throw new \RuntimeException("Error: There is not an initialized project."); } return $retType == "array" ? $this->project->toArray() : $this->project; }