function Differ::diff
Same name in this branch
- 11.1.x vendor/sebastian/diff/src/Differ.php \SebastianBergmann\Diff\Differ::diff()
- 11.1.x vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php \PhpParser\Internal\Differ::diff()
* Calculate diff (edit script) from $old to $new. * *
Parameters
T[] $old Original array: * @param T[] $new New array * * @return DiffElem[] Diff (edit script)
1 call to Differ::diff()
- Differ::diffWithReplacements in vendor/
phpstan/ phpdoc-parser/ src/ Printer/ Differ.php - * Calculate diff, including "replace" operations. * * If a sequence of remove operations is followed by the same number of add operations, these * will be coalesced into replace operations. * *
File
-
vendor/
phpstan/ phpdoc-parser/ src/ Printer/ Differ.php, line 47
Class
Namespace
PHPStan\PhpDocParser\PrinterCode
public function diff(array $old, array $new) : array {
[
$trace,
$x,
$y,
] = $this->calculateTrace($old, $new);
return $this->extractDiff($trace, $x, $y, $old, $new);
}