| @@ 544-556 (lines=13) @@ | ||
| 541 | ||
| 542 | // Keep track of which nodes we've visited and their position |
|
| 543 | // in the node list. |
|
| 544 | if (!isset($this->_visited[$childName])) { |
|
| 545 | $index = count($this->_nodes); |
|
| 546 | $this->_visited[$childName] = $index; |
|
| 547 | ||
| 548 | $this->_nodes[] = array( |
|
| 549 | 'name' => $childName, |
|
| 550 | 'callCount' => $metrics['ct'], |
|
| 551 | 'value' => $metrics[$metric], |
|
| 552 | ); |
|
| 553 | } else { |
|
| 554 | $revisit = true; |
|
| 555 | $index = $this->_visited[$childName]; |
|
| 556 | } |
|
| 557 | ||
| 558 | if ($parentIndex !== null) { |
|
| 559 | $this->_links[] = array( |
|
| @@ 621-632 (lines=12) @@ | ||
| 618 | ||
| 619 | // Keep track of which nodes we've visited and their position |
|
| 620 | // in the node list. |
|
| 621 | if (!isset($this->_visited[$childName])) { |
|
| 622 | $index = count($this->_nodes); |
|
| 623 | $this->_visited[$childName] = $index; |
|
| 624 | ||
| 625 | $this->_nodes[] = $current = array( |
|
| 626 | 'name' => $childName, |
|
| 627 | 'value' => $metrics[$metric], |
|
| 628 | ); |
|
| 629 | } else { |
|
| 630 | $revisit = true; |
|
| 631 | $index = $this->_visited[$childName]; |
|
| 632 | } |
|
| 633 | ||
| 634 | // If the current function has more children, |
|
| 635 | // walk that call subgraph. |
|