Lines Matching refs:diff
35 public function diff(array $old, array $new): array { function in PhpParser\\Internal\\Differ
54 return $this->coalesceReplacements($this->diff($old, $new));
139 * @param DiffElem[] $diff
142 private function coalesceReplacements(array $diff): array { argument
144 $c = \count($diff);
146 $diffType = $diff[$i]->type;
148 $newDiff[] = $diff[$i];
153 while ($j < $c && $diff[$j]->type === DiffElem::TYPE_REMOVE) {
158 while ($k < $c && $diff[$k]->type === DiffElem::TYPE_ADD) {
166 DiffElem::TYPE_REPLACE, $diff[$i + $n]->old, $diff[$j + $n]->new
171 $newDiff[] = $diff[$i];