|
2 | 2 |
|
3 | 3 | namespace Caxy\HtmlDiff; |
4 | 4 |
|
| 5 | +error_reporting(E_ALL); |
| 6 | + |
5 | 7 | class ListDiff extends HtmlDiff |
6 | 8 | { |
7 | 9 | /** |
@@ -125,7 +127,7 @@ protected function diffListContent() |
125 | 127 | protected function indexContent() |
126 | 128 | { |
127 | 129 | $this->contentIndex = array(); |
128 | | - $this->diffOrderIndex = array(); |
| 130 | + $this->diffOrderIndex = array('new' => array(), 'old' => array()); |
129 | 131 | foreach ($this->list as $type => $list) { |
130 | 132 |
|
131 | 133 | $this->contentIndex[$type] = array(); |
@@ -406,6 +408,8 @@ protected function buildChildLists() |
406 | 408 | */ |
407 | 409 | protected function diff() |
408 | 410 | { |
| 411 | + //$this->dump($this->diffOrderIndex, "diff order index"); |
| 412 | + //$this->dump($this->list, "list"); |
409 | 413 | // Add the opening parent node from listType. So if ol, <ol>, etc. |
410 | 414 | $this->content = $this->addListTypeWrapper(); |
411 | 415 |
|
@@ -455,6 +459,25 @@ protected function diff() |
455 | 459 | $this->content .= $this->addListTypeWrapper(false); |
456 | 460 | } |
457 | 461 |
|
| 462 | + protected function dump($asset, $string = '') |
| 463 | + { |
| 464 | + ini_set('xdebug.var_display_max_depth', 5); |
| 465 | + ini_set('xdebug.var_display_max_children', 2000); |
| 466 | + ini_set('xdebug.var_display_max_data', 1024); |
| 467 | + |
| 468 | + if ($string) { |
| 469 | + $trueString = "======================= " . $string; |
| 470 | + var_dump(strtoupper($trueString)); |
| 471 | + } |
| 472 | + |
| 473 | + var_dump($asset); |
| 474 | + |
| 475 | + if (isset($trueString)) { |
| 476 | + $trueString .= " ========= END END END"; |
| 477 | + var_dump(strtoupper($trueString)); |
| 478 | + } |
| 479 | + } |
| 480 | + |
458 | 481 | protected function getArrayByColumnValue($parentArray, $column, $value, $allMatches = false) |
459 | 482 | { |
460 | 483 | $returnArray = array(); |
|
0 commit comments