Code Duplication    Length = 6-8 lines in 2 locations

class/pear/System.php 2 locations

@@ 164-169 (lines=6) @@
161
        if ($aktinst < $maxinst || $maxinst == 0) {
162
            foreach ($list as $val) {
163
                $path = $sPath . DIRECTORY_SEPARATOR . $val;
164
                if (is_dir($path) && !is_link($path)) {
165
                    $tmp    = System::_dirToStruct($path, $maxinst, $aktinst+1, $silent);
166
                    $struct = array_merge_recursive($struct, $tmp);
167
                } else {
168
                    $struct['files'][] = $path;
169
                }
170
            }
171
        }
172
@@ 189-196 (lines=8) @@
186
        $struct = array('dirs' => array(), 'files' => array());
187
        settype($files, 'array');
188
        foreach ($files as $file) {
189
            if (is_dir($file) && !is_link($file)) {
190
                $tmp    = System::_dirToStruct($file, 0);
191
                $struct = array_merge_recursive($tmp, $struct);
192
            } else {
193
                if (!in_array($file, $struct['files'])) {
194
                    $struct['files'][] = $file;
195
                }
196
            }
197
        }
198
        return $struct;
199
    }