UnifiedDiffer

Class
implements DifferInterface
Read only: Yes Final: Yes

Generates unified diffs using the default Sebastian diff output builder.

Table of Contents

Interfaces

DifferInterface

Defines the contract for generating unified diffs.

Properties

 : Differ

Methods

__construct()

Creates a new unified differ.

 : mixed
diff()

Generates a unified diff between current and updated content.

 : string
Properties
Methods

__construct()

Public

Creates a new unified differ.

public __construct(Differ  $differ) : mixed
Parameters
$differ : Differ

Description

the underlying Sebastian differ

diff()

Public

Generates a unified diff between current and updated content.

public diff( string  $currentContent, string  $updatedContent) : string
Parameters
$currentContent : string

Description

the current content

$updatedContent : string

Description

the updated content

Return values
string

Description

the unified diff