public function removeMethod($method) { $m = $method instanceof MethodGenerator ? $method->getName() : $method; if (isset($this->methods[$m])) { unset($this->methods[$m]); } return $this; }