Documentation

Diff extends AbstractHelper
in package

Table of Contents

Constants

DIFF_RENDER_COMBINED  = 'Combined'
DIFF_RENDER_INLINE  = 'Inline'
DIFF_RENDER_SIDE_BY_SIDE  = 'SideBySide'

Properties

$config  : array<string|int, mixed>

Methods

__construct()  : mixed
While `php-diff` has a `RendererFactory` it requires the renderer type to be provided, this would mean that we have to inject three different instances of the renderer. This is not really a better solution than just creating the renderers when invoked.
__invoke()  : string|null

Constants

DIFF_RENDER_COMBINED

public mixed DIFF_RENDER_COMBINED = 'Combined'

DIFF_RENDER_INLINE

public mixed DIFF_RENDER_INLINE = 'Inline'

DIFF_RENDER_SIDE_BY_SIDE

public mixed DIFF_RENDER_SIDE_BY_SIDE = 'SideBySide'

Properties

$config read-only

private array<string|int, mixed> $config

Methods

__construct()

While `php-diff` has a `RendererFactory` it requires the renderer type to be provided, this would mean that we have to inject three different instances of the renderer. This is not really a better solution than just creating the renderers when invoked.

public __construct(array<string|int, mixed> $config) : mixed
Parameters
$config : array<string|int, mixed>
Tags
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

__invoke()

public __invoke(string|null $old, string|null $new[, string $renderer = self::DIFF_RENDER_COMBINED ][, array<string|int, mixed> $rendererOverwrites = [] ][, array<string|int, mixed> $differOverwrites = [] ]) : string|null
Parameters
$old : string|null
$new : string|null
$renderer : string = self::DIFF_RENDER_COMBINED
$rendererOverwrites : array<string|int, mixed> = []
$differOverwrites : array<string|int, mixed> = []
Tags
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

Return values
string|null

        
On this page

Search results