function Differ::diffWithReplacements
Same name in this branch
- 11.1.x vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php \PhpParser\Internal\Differ::diffWithReplacements()
* 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. * *
Parameters
T[] $old Original array: * @param T[] $new New array * * @return DiffElem[] Diff (edit script), including replace operations
File
-
vendor/
phpstan/ phpdoc-parser/ src/ Printer/ Differ.php, line 64
Class
Namespace
PHPStan\PhpDocParser\PrinterCode
public function diffWithReplacements(array $old, array $new) : array {
return $this->coalesceReplacements($this->diff($old, $new));
}