src/Leevel/Kernel/Utils/Doc.php
public static function getMethodBody(string $className, string $method, bool $isDoc = false): string
    {
        $doc = new static('');

        $lines = $doc->parseFileContnet(new ReflectionClass($className));

        $method = new ReflectionMethod($className, $method);

        return $doc->parseMethodBody($lines, $method, $isDoc);
    }
public static function getMethodBody(string $className, string $method, bool $isDoc = false): string
    {
        $doc = new static('');

        $lines = $doc->parseFileContnet(new ReflectionClass($className));

        $method = new ReflectionMethod($className, $method);

        return $doc->parseMethodBody($lines, $method, $isDoc);
    }
获取方法内容.

@param string $className
@param string $method
@param bool   $isDoc

@return string