src/Dev/CliDebugView.php
public function renderSourceFragment($lines, $errline)
    {
        $output = "Source\n======\n";
        foreach ($lines as $offset => $line) {
            $output .= ($offset == $errline) ? "* " : "  ";
            $output .= str_pad("$offset:", 5);
            $output .= wordwrap($line, self::config()->columns, "\n       ");
        }
        $output .= "\n";

        return $output;
    }
public function renderSourceFragment($lines, $errline)
    {
        $output = "Source\n======\n";
        foreach ($lines as $offset => $line) {
            $output .= ($offset == $errline) ? "* " : "  ";
            $output .= str_pad("$offset:", 5);
            $output .= wordwrap($line, self::config()->columns, "\n       ");
        }
        $output .= "\n";

        return $output;
    }
public function renderSourceFragment ( $ lines , $ errline ) { $ output = "Source\n======\n" ; foreach ( $ lines as $ offset => $ line ) { $ output .= ( $ offset == $ errline ) ? "* " : "  " ; $ output .= str_pad ( "$offset:" , 5 ) ; $ output .= wordwrap ( $ line , self :: config ( ) -> columns , "\n       " ) ; } $ output .= "\n" ; return $ output ; }
Write a fragment of the a source file

@param array $lines An array of file lines; the keys should be the original line numbers
@param int $errline Index of the line in $lines which has the error
@return string
Write a fragment of the a source file