Code Duplication    Length = 7-7 lines in 2 locations

class/tree.php 2 locations

@@ 62-68 (lines=7) @@
59
        protected function makeTreeItems($key, &$ret, $prefix_orig, $prefix_curr = '', $tags = null)
60
        {
61
            if ($key > 0) {
62
                if (count($tags) > 0) {
63
                    foreach ($tags as $tag) {
64
                        $ret[$key][$tag] = $this->tree[$key]['obj']->getVar($tag);
65
                    }
66
                } else {
67
                    $ret[$key]['forum_name'] = $this->tree[$key]['obj']->getVar('forum_name');
68
                }
69
                $ret[$key]['prefix'] = $prefix_curr;
70
                $prefix_curr         .= $prefix_orig;
71
            }
@@ 198-204 (lines=7) @@
195
            if (isset($this->tree[$key]['child'])) {
196
                foreach ($this->tree[$key]['child'] as $childkey) {
197
                    if (isset($this->tree[$childkey]['obj'])) {
198
                        if (count($tags) > 0) {
199
                            foreach ($tags as $tag) {
200
                                $ret['child'][$childkey][$tag] = $this->tree[$childkey]['obj']->getVar($tag);
201
                            }
202
                        } else {
203
                            $ret['child'][$childkey]['forum_name'] = $this->tree[$childkey]['obj']->getVar('forum_name');
204
                        }
205
                    }
206
207
                    $this->getAllChildArray($childkey, $ret['child'][$childkey], $tags, $depth);