protected function createCodeForMethods($methods)
    {
        $code    = '';
        $methods = array_merge($methods, $this->reflection->getMethods());

        foreach ($methods as $method) {
            if ($this->isConstructorOrDeconstructor($method)) {
                continue;
            }
            $mock_reflection = new SimpleReflection($this->mock_base);
            if (in_array($method, $mock_reflection->getMethods())) {
                continue;
            }

            $code .= '    ' . $this->reflection->getSignature($method);

            if($mock_reflection->isAbstract()) {
                // abstract function has no body. end the signature statement.
                $code .= ";\n";
            } else {
                $code .= " {\n";
                $code .= "        return \$this->invoke(\"$method\", func_get_args());\n";
                $code .= "    }\n";
            }

        }

        return $code;
    }