Skip to content

UnifiedDiffer

github-actions edited this page Apr 19, 2026 · 1 revision

Generates unified diffs using the default Sebastian diff output builder.


Methods

__construct

Creates a new unified differ.

public __construct(\SebastianBergmann\Diff\Differ $differ): mixed

Parameters:

Parameter Type Description
$differ \SebastianBergmann\Diff\Differ the underlying Sebastian differ

diff

Generates a unified diff between current and updated content.

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

Parameters:

Parameter Type Description
$currentContent string the current content
$updatedContent string the updated content

Return Value:

the unified diff


Clone this wiki locally