public function replaceMethod($methodName, $newCode)
    {
        if ($methodCode = $this->findMethod($methodName)) {
            $this->code = str_replace($methodCode, $newCode, $this->code);
            $this->knownMethodCache[$methodName] = $newCode;

            return $methodCode;
        }

        return false;
    }