public function getMethod($nameOrMethod): PhpMethod {
		if ($nameOrMethod instanceof PhpMethod) {
			$nameOrMethod = $nameOrMethod->getName();
		}

		if (!$this->methods->has($nameOrMethod)) {
			throw new \InvalidArgumentException(sprintf('The method "%s" does not exist.', $nameOrMethod));
		}

		return $this->methods->get($nameOrMethod);
	}
public function getMethod($nameOrMethod): PhpMethod {
		if ($nameOrMethod instanceof PhpMethod) {
			$nameOrMethod = $nameOrMethod->getName();
		}

		if (!$this->methods->has($nameOrMethod)) {
			throw new \InvalidArgumentException(sprintf('The method "%s" does not exist.', $nameOrMethod));
		}

		return $this->methods->get($nameOrMethod);
	}
public function getMethod ( $ nameOrMethod ) : PhpMethod { if ( $ nameOrMethod instanceof PhpMethod ) { $ nameOrMethod = $ nameOrMethod -> getName ( ) ; } if ( ! $ this -> methods -> has ( $ nameOrMethod ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The method "%s" does not exist.' , $ nameOrMethod ) ) ; } return $ this -> methods -> get ( $ nameOrMethod ) ; }
Returns a method

@param string $nameOrMethod the methods name
@throws \InvalidArgumentException if the method cannot be found
@return PhpMethod
Returns a method