public function hasMethod($nameOrMethod) { if ($nameOrMethod instanceof PhpMethod) { $nameOrMethod = $nameOrMethod->getName(); } return $this->methods->has($nameOrMethod); }