protected function getMethodCodeByName($fullClassName, $methodName) { $class = new ReflectionClass($fullClassName); $method = $class->getMethod($methodName); $start = $method->getStartLine(); $docBlock = $method->getDocComment(); if ($docBlock !== false) { $start -= count(explode("\n", $docBlock)); } $end = $method->getEndLine(); $path = CodeGeneratorHelper::absPath($fullClassName, RootPath::path()); return CodeGeneratorHelper::filePartialContent($path, $start, $end); }