Skip to content

Commit 9207f73

Browse files
committed
fix example
1 parent e940dd9 commit 9207f73

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

lib/jblond/Diff/Renderer/Html/HtmlArray.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ public function render()
115115
// As we'll be modifying a & b to include our change markers,
116116
// we need to get the contents and store them here. That way
117117
// we're not going to destroy the original data
118-
$a = $this->diff->getA();
119-
$b = $this->diff->getB();
118+
$a = $this->diff->getOld();
119+
$b = $this->diff->getNew();
120120

121121
$changes = array();
122122
$opCodes = $this->diff->getGroupedOpcodes();

lib/jblond/Diff/Renderer/Text/Context.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function render() : string
100100
continue;
101101
}
102102
$diff .= $this->tagMap[$tag] . ' ' .
103-
implode("\n" . $this->tagMap[$tag] .' ', $this->diff->GetA($i1, $i2)) . "\n";
103+
implode("\n" . $this->tagMap[$tag] .' ', $this->diff->getOld($i1, $i2)) . "\n";
104104
}
105105
}
106106

@@ -121,7 +121,7 @@ public function render() : string
121121
continue;
122122
}
123123
$diff .= $this->tagMap[$tag] . ' ' .
124-
implode("\n".$this->tagMap[$tag] . ' ', $this->diff->GetB($j1, $j2)) . "\n";
124+
implode("\n".$this->tagMap[$tag] . ' ', $this->diff->getNew($j1, $j2)) . "\n";
125125
}
126126
}
127127
}

lib/jblond/Diff/Renderer/Text/Unified.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ public function render() : string
7575
foreach ($group as $code) {
7676
list($tag, $i1, $i2, $j1, $j2) = $code;
7777
if ($tag == 'equal') {
78-
$diff .= ' '.implode("\n ", $this->diff->GetA($i1, $i2))."\n";
78+
$diff .= ' '.implode("\n ", $this->diff->getOld($i1, $i2))."\n";
7979
} else {
8080
if ($tag == 'replace' || $tag == 'delete') {
81-
$diff .= '-'.implode("\n-", $this->diff->GetA($i1, $i2))."\n";
81+
$diff .= '-'.implode("\n-", $this->diff->getOld($i1, $i2))."\n";
8282
}
8383

8484
if ($tag == 'replace' || $tag == 'insert') {
85-
$diff .= '+'.implode("\n+", $this->diff->GetB($j1, $j2))."\n";
85+
$diff .= '+'.implode("\n+", $this->diff->getNew($j1, $j2))."\n";
8686
}
8787
}
8888
}

0 commit comments

Comments
 (0)