class Differ implements DifferInterface (View source)

Properties

protected int $maxTrailingUnchangedLines
protected Differ $differ

Methods

__construct(int $maxTrailingUnchangedLines = 3)

Initialize the instance.

diff($old, $new)

{@inheritdoc}

string
countTrailingUnchangedLines(array $lines)

Count the number of unchanged trailing lines.

Details

__construct(int $maxTrailingUnchangedLines = 3)

Initialize the instance.

Parameters

int $maxTrailingUnchangedLines

the maximum number of unchanged trailing lines to be kept

diff($old, $new)

{@inheritdoc}

Parameters

$old
$new

See also

\PhpCsFixer\Differ\DifferInterface::diff()

protected string countTrailingUnchangedLines(array $lines)

Count the number of unchanged trailing lines.

Parameters

array $lines

Return Value

string