src/Reflection/ReflectionClass.php
public function removeMethod(string $methodName) : bool
    {
        $lowerName = strtolower($methodName);
        foreach ($this->node->stmts as $key => $stmt) {
            if ($stmt instanceof ClassMethod && $lowerName === $stmt->name->toLowerString()) {
                unset($this->node->stmts[$key], $this->cachedMethods);

                return true;
            }
        }

        return false;
    }
public function removeMethod(string $methodName) : bool
    {
        $lowerName = strtolower($methodName);
        foreach ($this->node->stmts as $key => $stmt) {
            if ($stmt instanceof ClassMethod && $lowerName === $stmt->name->toLowerString()) {
                unset($this->node->stmts[$key], $this->cachedMethods);

                return true;
            }
        }

        return false;
    }
Remove the named method from the class.

Returns true if method was successfully removed.
Returns false if method was not found, or could not be removed.