DiffFormatter
class DiffFormatter extends DiffFormatter (View source)
Diff formatter which uses returns output that can be rendered to a table.
Properties
| $show_header | Should a block header be shown? |
from DiffFormatter | |
| $leading_context_lines | Number of leading context "lines" to preserve. |
from DiffFormatter | |
| $trailing_context_lines | Number of trailing context "lines" to preserve. |
from DiffFormatter | |
| protected array | $line_stats | The line stats. |
from DiffFormatter |
| protected array | $rows | The diff represented as an array of rows. |
Methods
No description
No description
No description
No description
No description
No description
No description
No description
No description
Creates a DiffFormatter to render diffs in a table.
Creates an added line.
Creates a deleted line.
Creates a context line.
Creates an empty line.
Details
string
format(Diff $diff)
Format a diff.
protected
_block($xbeg, $xlen, $ybeg, $ylen, $edits)
No description
protected
_start_diff()
No description
protected
_end_diff()
No description
protected
_block_header($xbeg, $xlen, $ybeg, $ylen)
No description
protected
_start_block($header)
No description
protected
_end_block()
No description
protected
_lines($lines, $prefix = ' ', $color = 'white')
No description
protected
_context($lines)
No description
protected
_added($lines)
No description
protected
_deleted($lines)
No description
protected
_changed($orig, $closing)
No description
__construct(ConfigFactoryInterface $config_factory)
Creates a DiffFormatter to render diffs in a table.
protected array
addedLine(string $line)
Creates an added line.
protected array
deletedLine(string $line)
Creates a deleted line.
protected array
contextLine(string $line)
Creates a context line.
protected array
emptyLine()
Creates an empty line.