public function setMethod(PhpMethod $method) { $method->setParent($this); $this->methods->set($method->getName(), $method); return $this; }