BetterReflection\Reflection\ReflectionFunctionAbstract::getBodyCode PHP Method

getBodyCode() public method

If a PrettyPrinter is provided as a paramter, it will be used, otherwise a default will be used. Note that the formatting of the code may not be the same as the original function. If specific formatting is required, you should provide your own implementation of a PrettyPrinter to unparse the AST.
public getBodyCode ( PrettyPrinterAbstract $printer = null ) : string
$printer PhpParser\PrettyPrinterAbstract
return string
    public function getBodyCode(PrettyPrinterAbstract $printer = null)
    {
        if (null === $printer) {
            $printer = new StandardPrettyPrinter();
        }
        return $printer->prettyPrint($this->getBodyAst());
    }