Page MenuHomePhorge
Diviner Tech Docs DifferentialHunkParser

final class DifferentialHunkParser
Phorge Technical Documentation (Differential)

This class is not documented.

Methods

public function __get($name)
Inherited

This method is not documented.
Parameters
$name
Return
wild

public function __set($name, $value)
Inherited

This method is not documented.
Parameters
$name
$value
Return
wild

public function current()
Inherited

This method is not documented.
Return
wild

public function key()
Inherited

This method is not documented.
Return
wild

public function next()
Inherited

This method is not documented.
Return
wild

public function rewind()
Inherited

This method is not documented.
Return
wild

public function valid()
Inherited

This method is not documented.
Return
wild

private function throwOnAttemptedIteration()
Inherited

This method is not documented.
Return
wild

public function getPhobjectClassConstant($key, $byte_limit)
Inherited

Phobject

Read the value of a class constant.

This is the same as just typing self::CONSTANTNAME, but throws a more useful message if the constant is not defined and allows the constant to be limited to a maximum length.

Parameters
string$keyName of the constant.
int|null$byte_limitMaximum number of bytes permitted in the value.
Return
stringValue of the constant.

public function getHunkStartLines($hunks)

Get a map of lines on which hunks start, other than line 1. This datastructure is used to determine when to render "Context not available." in diffs with multiple hunks.

Parameters
array$hunks
Return
dict<int, bool>Map of lines where hunks start, other than line 1.

private function setVisibleLinesMask($mask)

This method is not documented.
Parameters
$mask
Return
wild

public function getVisibleLinesMask()

This method is not documented.
Return
wild

private function setIntraLineDiffs($intra_line_diffs)

This method is not documented.
Parameters
$intra_line_diffs
Return
wild

public function getIntraLineDiffs()

This method is not documented.
Return
wild

private function setNewLines($new_lines)

This method is not documented.
Parameters
$new_lines
Return
wild

public function getNewLines()

This method is not documented.
Return
wild

private function setOldLines($old_lines)

This method is not documented.
Parameters
$old_lines
Return
wild

public function getOldLines()

This method is not documented.
Return
wild

public function getOldLineTypeMap()

This method is not documented.
Return
wild

public function setOldLineTypeMap($map)

This method is not documented.
Parameters
array$map
Return
wild

public function getNewLineTypeMap()

This method is not documented.
Return
wild

public function setNewLineTypeMap($map)

This method is not documented.
Parameters
array$map
Return
wild

public function setDepthOnlyLines($map)

This method is not documented.
Parameters
array$map
Return
wild

public function getDepthOnlyLines()

This method is not documented.
Return
wild

public function setNormalized($normalized)

This method is not documented.
Parameters
$normalized
Return
wild

public function getNormalized()

This method is not documented.
Return
wild

public function getIsDeleted()

This method is not documented.
Return
wild

public function getHasAnyChanges()

Returns true if the hunks change anything, including whitespace.

Return
wild

private function getHasChanges($filter)

This method is not documented.
Parameters
$filter
Return
wild

This function takes advantage of the parsing work done in parseHunksForLineData() and continues the struggle to hammer this data into something we can display to a user.

In particular, this function re-parses the hunks to make them equivalent in length for easy rendering, adding null as necessary to pad the length.

Anyhoo, this function is not particularly well-named but I try.

NOTE: this function must be called after parseHunksForLineData().
Return
wild

public function generateIntraLineDiffs()

This method is not documented.
Return
wild

public function generateVisibleBlocksMask($lines_context)

This method is not documented.
Parameters
$lines_context
Return
wild

public function generateVisibleLinesMask($lines_context)

This method is not documented.
Parameters
$lines_context
Return
wild

public function getOldCorpus()

This method is not documented.
Return
wild

public function getNewCorpus()

This method is not documented.
Return
wild

private function getCorpus($lines)

This method is not documented.
Parameters
array$lines
Return
wild

public function parseHunksForLineData($hunks)

This method is not documented.
Parameters
array$hunks
Return
wild

public function parseHunksForHighlightMasks($changeset_hunks, $old_hunks, $new_hunks)

This method is not documented.
Parameters
array$changeset_hunks
array$old_hunks
array$new_hunks
Return
wild

public function makeContextDiff($hunks, $is_new, $line_number, $line_length, $add_context)

This method is not documented.
Parameters
array$hunks
$is_new
$line_number
$line_length
$add_context
Return
wild

private function computeOffsets($hunks)

This method is not documented.
Parameters
array$hunks
Return
wild

private function getIndentDepth($text, $tab_width)

This method is not documented.
Parameters
$text
$tab_width
Return
wild

private function getCharacterCountForVisualWhitespace($text, $depth, $tab_width)

This method is not documented.
Parameters
$text
$depth
$tab_width
Return
wild
This method is not documented.
Return
wild