@@ -157,6 +157,9 @@ discard block |
||
157 | 157 | $this->processInsertOperation( $operation, "diffmod" ); |
158 | 158 | } |
159 | 159 | |
160 | + /** |
|
161 | + * @param string $cssClass |
|
162 | + */ |
|
160 | 163 | protected function processInsertOperation($operation, $cssClass) |
161 | 164 | { |
162 | 165 | $text = array(); |
@@ -174,6 +177,9 @@ discard block |
||
174 | 177 | $this->insertTag( "ins", $cssClass, $text ); |
175 | 178 | } |
176 | 179 | |
180 | + /** |
|
181 | + * @param string $cssClass |
|
182 | + */ |
|
177 | 183 | protected function processDeleteOperation($operation, $cssClass) |
178 | 184 | { |
179 | 185 | $text = array(); |
@@ -213,6 +219,10 @@ discard block |
||
213 | 219 | return $this->diffElements($oldText, $newText, $stripWrappingTags); |
214 | 220 | } |
215 | 221 | |
222 | + /** |
|
223 | + * @param string $oldText |
|
224 | + * @param string $newText |
|
225 | + */ |
|
216 | 226 | protected function diffElements($oldText, $newText, $stripWrappingTags = true) |
217 | 227 | { |
218 | 228 | $wrapStart = ''; |
@@ -235,6 +245,10 @@ discard block |
||
235 | 245 | return $wrapStart . $diff->build() . $wrapEnd; |
236 | 246 | } |
237 | 247 | |
248 | + /** |
|
249 | + * @param string $oldText |
|
250 | + * @param string $newText |
|
251 | + */ |
|
238 | 252 | protected function diffList($oldText, $newText) |
239 | 253 | { |
240 | 254 | $diff = new ListDiffNew($oldText, $newText, $this->encoding, $this->specialCaseTags, $this->groupDiffs); |
@@ -298,6 +312,9 @@ discard block |
||
298 | 312 | return null; |
299 | 313 | } |
300 | 314 | |
315 | + /** |
|
316 | + * @param string $text |
|
317 | + */ |
|
301 | 318 | protected function isListPlaceholder($text) |
302 | 319 | { |
303 | 320 | return $this->isPlaceholderType($text, array('ol', 'dl', 'ul')); |
@@ -338,6 +355,10 @@ discard block |
||
338 | 355 | return in_array($text, $criteria, $strict); |
339 | 356 | } |
340 | 357 | |
358 | + /** |
|
359 | + * @param Operation $operation |
|
360 | + * @param integer $posInNew |
|
361 | + */ |
|
341 | 362 | protected function findIsolatedDiffTagsInOld($operation, $posInNew) |
342 | 363 | { |
343 | 364 | $offset = $posInNew - $operation->startInNew; |
@@ -345,6 +366,9 @@ discard block |
||
345 | 366 | return $this->oldIsolatedDiffTags[$operation->startInOld + $offset]; |
346 | 367 | } |
347 | 368 | |
369 | + /** |
|
370 | + * @param string $tag |
|
371 | + */ |
|
348 | 372 | protected function insertTag($tag, $cssClass, &$words) |
349 | 373 | { |
350 | 374 | while (true) { |
@@ -406,11 +430,17 @@ discard block |
||
406 | 430 | return $condition == 'tag' ? $this->isTag( $word ) : !$this->isTag( $word ); |
407 | 431 | } |
408 | 432 | |
433 | + /** |
|
434 | + * @param string $text |
|
435 | + */ |
|
409 | 436 | protected function wrapText($text, $tagName, $cssClass) |
410 | 437 | { |
411 | 438 | return sprintf( '<%1$s class="%2$s">%3$s</%1$s>', $tagName, $cssClass, $text ); |
412 | 439 | } |
413 | 440 | |
441 | + /** |
|
442 | + * @param string $condition |
|
443 | + */ |
|
414 | 444 | protected function extractConsecutiveWords(&$words, $condition) |
415 | 445 | { |
416 | 446 | $indexOfFirstTag = null; |
@@ -503,6 +533,12 @@ discard block |
||
503 | 533 | return $matchingBlocks; |
504 | 534 | } |
505 | 535 | |
536 | + /** |
|
537 | + * @param integer $startInOld |
|
538 | + * @param integer $endInOld |
|
539 | + * @param integer $startInNew |
|
540 | + * @param integer $endInNew |
|
541 | + */ |
|
506 | 542 | protected function findMatchingBlocks($startInOld, $endInOld, $startInNew, $endInNew, &$matchingBlocks) |
507 | 543 | { |
508 | 544 | $match = $this->findMatch( $startInOld, $endInOld, $startInNew, $endInNew ); |