Skip to content
PHP Ecosystem
Explore

DiffLine

API reference › Diff › DiffLine

final readonly classPHPForge\Diff\DiffLine
Sourcesrc/DiffLine.php

Represents a single line of an edit script produced by DifferInterface.

PropertyTypeDescriptionDefined by
$line readonly constructorstringLine content without its trailing "\n"; a "\r" left by CRLF input is kept.DiffLine
$op readonly constructorDiffOpOperation applied to the line.DiffLine
MethodDescriptionDefined by
__construct()Creates a diff line.DiffLine
public function __construct(PHPForge\Diff\DiffOp $op, string $line)

Creates a diff line.

Parameters

ParameterTypeDescription
$opDiffOpOperation applied to the line.
$linestringLine content without its trailing "\n"; a "\r" left by CRLF input is kept.