Differ
in package
FinalYes
Table of Contents
Constants
- ADDED = 1
- DIFF_LINE_END_WARNING = 3
- NO_LINE_END_EOF_WARNING = 4
- OLD = 0
- REMOVED = 2
Properties
Methods
- __construct() : mixed
- diff() : string
- diffToArray() : array<string|int, mixed>
- calculateEstimatedFootprint() : float|int
- detectUnmatchedLineEndings() : bool
- getArrayDiffParted() : array<string|int, mixed>
- getLinebreak() : string
- selectLcsImplementation() : LongestCommonSubsequenceCalculator
- splitStringByLines() : array<string|int, mixed>
Constants
ADDED
public
mixed
ADDED
= 1
DIFF_LINE_END_WARNING
public
mixed
DIFF_LINE_END_WARNING
= 3
NO_LINE_END_EOF_WARNING
public
mixed
NO_LINE_END_EOF_WARNING
= 4
OLD
public
mixed
OLD
= 0
REMOVED
public
mixed
REMOVED
= 2
Properties
$outputBuilder
private
DiffOutputBuilderInterface
$outputBuilder
Methods
__construct()
public
__construct(DiffOutputBuilderInterface $outputBuilder) : mixed
Parameters
- $outputBuilder : DiffOutputBuilderInterface
diff()
public
diff(array<string|int, mixed>|string $from, array<string|int, mixed>|string $to[, LongestCommonSubsequenceCalculator|null $lcs = null ]) : string
Parameters
- $from : array<string|int, mixed>|string
- $to : array<string|int, mixed>|string
- $lcs : LongestCommonSubsequenceCalculator|null = null
Return values
stringdiffToArray()
public
diffToArray(array<string|int, mixed>|string $from, array<string|int, mixed>|string $to[, LongestCommonSubsequenceCalculator|null $lcs = null ]) : array<string|int, mixed>
Parameters
- $from : array<string|int, mixed>|string
- $to : array<string|int, mixed>|string
- $lcs : LongestCommonSubsequenceCalculator|null = null
Return values
array<string|int, mixed>calculateEstimatedFootprint()
private
calculateEstimatedFootprint(array<string|int, mixed> $from, array<string|int, mixed> $to) : float|int
Parameters
- $from : array<string|int, mixed>
- $to : array<string|int, mixed>
Return values
float|intdetectUnmatchedLineEndings()
private
detectUnmatchedLineEndings(array<string|int, mixed> $diff) : bool
Parameters
- $diff : array<string|int, mixed>
Return values
boolgetArrayDiffParted()
private
static getArrayDiffParted(array<string|int, mixed> &$from, array<string|int, mixed> &$to) : array<string|int, mixed>
Parameters
- $from : array<string|int, mixed>
- $to : array<string|int, mixed>
Return values
array<string|int, mixed>getLinebreak()
private
getLinebreak(mixed $line) : string
Parameters
- $line : mixed
Return values
stringselectLcsImplementation()
private
selectLcsImplementation(array<string|int, mixed> $from, array<string|int, mixed> $to) : LongestCommonSubsequenceCalculator
Parameters
- $from : array<string|int, mixed>
- $to : array<string|int, mixed>
Return values
LongestCommonSubsequenceCalculatorsplitStringByLines()
private
splitStringByLines(string $input) : array<string|int, mixed>
Parameters
- $input : string