Code Duplication    Length = 12-13 lines in 2 locations

src/Xhgui/Profile.php 2 locations

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