5
5
* PHP version 5
6
6
*
7
7
* Copyright (c) 2009 Chris Boulton <chris.boulton@interspire.com>
8
- *
8
+ *
9
9
* All rights reserved.
10
- *
11
- * Redistribution and use in source and binary forms, with or without
10
+ *
11
+ * Redistribution and use in source and binary forms, with or without
12
12
* modification, are permitted provided that the following conditions are met:
13
13
*
14
14
* - Redistributions of source code must retain the above copyright notice,
15
15
* this list of conditions and the following disclaimer.
16
16
* - Redistributions in binary form must reproduce the above copyright notice,
17
17
* this list of conditions and the following disclaimer in the documentation
18
18
* and/or other materials provided with the distribution.
19
- * - Neither the name of the Chris Boulton nor the names of its contributors
20
- * may be used to endorse or promote products derived from this software
19
+ * - Neither the name of the Chris Boulton nor the names of its contributors
20
+ * may be used to endorse or promote products derived from this software
21
21
* without specific prior written permission.
22
22
*
23
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
33
* POSSIBILITY OF SUCH DAMAGE.
34
34
*
35
35
* @package DiffLib
@@ -69,8 +69,8 @@ public function render()
69
69
foreach ($ changes as $ i => $ blocks ) {
70
70
if ($ i > 0 ) {
71
71
$ html .= '<tbody class="Skipped"> ' ;
72
- $ html .= '<th>…</th><td>  ;</td> ' ;
73
- $ html .= '<th>…</th><td>  ;</td> ' ;
72
+ $ html .= '<th>…</th><td>  ;</td> ' ;
73
+ $ html .= '<th>…</th><td>  ;</td> ' ;
74
74
$ html .= '</tbody> ' ;
75
75
}
76
76
@@ -83,9 +83,9 @@ public function render()
83
83
$ toLine = $ change ['changed ' ]['offset ' ] + $ no + 1 ;
84
84
$ html .= '<tr> ' ;
85
85
$ html .= '<th> ' .$ fromLine .'</th> ' ;
86
- $ html .= '<td class="Left"><span> ' .$ line .'</span>  ;</span></td> ' ;
86
+ $ html .= '<td class="Left"><span> ' .$ line .'</span>  ;</span></td> ' ;
87
87
$ html .= '<th> ' .$ toLine .'</th> ' ;
88
- $ html .= '<td class="Right"><span> ' .$ line .'</span>  ;</span></td> ' ;
88
+ $ html .= '<td class="Right"><span> ' .$ line .'</span>  ;</span></td> ' ;
89
89
$ html .= '</tr> ' ;
90
90
}
91
91
}
@@ -94,10 +94,10 @@ public function render()
94
94
foreach ($ change ['changed ' ]['lines ' ] as $ no => $ line ) {
95
95
$ toLine = $ change ['changed ' ]['offset ' ] + $ no + 1 ;
96
96
$ html .= '<tr> ' ;
97
- $ html .= '<th>  ;</th> ' ;
98
- $ html .= '<td class="Left">  ;</td> ' ;
97
+ $ html .= '<th>  ;</th> ' ;
98
+ $ html .= '<td class="Left">  ;</td> ' ;
99
99
$ html .= '<th> ' .$ toLine .'</th> ' ;
100
- $ html .= '<td class="Right"><ins> ' .$ line .'</ins>  ;</td> ' ;
100
+ $ html .= '<td class="Right"><ins> ' .$ line .'</ins>  ;</td> ' ;
101
101
$ html .= '</tr> ' ;
102
102
}
103
103
}
@@ -107,9 +107,9 @@ public function render()
107
107
$ fromLine = $ change ['base ' ]['offset ' ] + $ no + 1 ;
108
108
$ html .= '<tr> ' ;
109
109
$ html .= '<th> ' .$ fromLine .'</th> ' ;
110
- $ html .= '<td class="Left"><del> ' .$ line .'</del>  ;</td> ' ;
111
- $ html .= '<th>  ;</th> ' ;
112
- $ html .= '<td class="Right">  ;</td> ' ;
110
+ $ html .= '<td class="Left"><del> ' .$ line .'</del>  ;</td> ' ;
111
+ $ html .= '<th>  ;</th> ' ;
112
+ $ html .= '<td class="Right">  ;</td> ' ;
113
113
$ html .= '</tr> ' ;
114
114
}
115
115
}
@@ -120,10 +120,10 @@ public function render()
120
120
$ fromLine = $ change ['base ' ]['offset ' ] + $ no + 1 ;
121
121
$ html .= '<tr> ' ;
122
122
$ html .= '<th> ' .$ fromLine .'</th> ' ;
123
- $ html .= '<td class="Left"><span> ' .$ line .'</span>  ;</td> ' ;
123
+ $ html .= '<td class="Left"><span> ' .$ line .'</span>  ;</td> ' ;
124
124
if (!isset ($ change ['changed ' ]['lines ' ][$ no ])) {
125
- $ toLine = '  ; ' ;
126
- $ changedLine = '  ; ' ;
125
+ $ toLine = '  ; ' ;
126
+ $ changedLine = '  ; ' ;
127
127
}
128
128
else {
129
129
$ toLine = $ change ['base ' ]['offset ' ] + $ no + 1 ;
@@ -137,16 +137,16 @@ public function render()
137
137
else {
138
138
foreach ($ change ['changed ' ]['lines ' ] as $ no => $ changedLine ) {
139
139
if (!isset ($ change ['base ' ]['lines ' ][$ no ])) {
140
- $ fromLine = '  ; ' ;
141
- $ line = '  ; ' ;
140
+ $ fromLine = '  ; ' ;
141
+ $ line = '  ; ' ;
142
142
}
143
143
else {
144
144
$ fromLine = $ change ['base ' ]['offset ' ] + $ no + 1 ;
145
145
$ line = '<span> ' .$ change ['base ' ]['lines ' ][$ no ].'</span> ' ;
146
146
}
147
147
$ html .= '<tr> ' ;
148
148
$ html .= '<th> ' .$ fromLine .'</th> ' ;
149
- $ html .= '<td class="Left"><span> ' .$ line .'</span>  ;</td> ' ;
149
+ $ html .= '<td class="Left"><span> ' .$ line .'</span>  ;</td> ' ;
150
150
$ toLine = $ change ['changed ' ]['offset ' ] + $ no + 1 ;
151
151
$ html .= '<th> ' .$ toLine .'</th> ' ;
152
152
$ html .= '<td class="Right"> ' .$ changedLine .'</td> ' ;
0 commit comments