protected function getMethodBody(ReflectionMethod $method)
    {
        // Get file content for the method

        $file = new SplFileObject($method->getFileName());

        $methodBodyLines = iterator_to_array(
            new LimitIterator(
                $file,
                $method->getStartLine(),
                $method->getEndLine() - $method->getStartLine()
            )
        );

        return implode("\n", $methodBodyLines);
    }
protected function getMethodBody(ReflectionMethod $method)
    {
        // Get file content for the method

        $file = new SplFileObject($method->getFileName());

        $methodBodyLines = iterator_to_array(
            new LimitIterator(
                $file,
                $method->getStartLine(),
                $method->getEndLine() - $method->getStartLine()
            )
        );

        return implode("\n", $methodBodyLines);
    }
protected function getMethodBody ( ReflectionMethod $ method ) { // Get file content for the method $ file = new SplFileObject ( $ method -> getFileName ( ) ) ; $ methodBodyLines = iterator_to_array ( new LimitIterator ( $ file , $ method -> getStartLine ( ) , $ method -> getEndLine ( ) - $ method -> getStartLine ( ) ) ) ; return implode ( "\n" , $ methodBodyLines ) ; }
Returns the PHP code for a ReflectionMethod.

@param ReflectionMethod $method
@return string
Returns the PHP code for a ReflectionMethod .