Code Duplication    Length = 4-4 lines in 2 locations

src/xml.php 2 locations

@@ 104-107 (lines=4) @@
101
                        $result
102
                    );
103
                    $repeated_tag_index[$tag . '_' . $level] = 2;
104
                    if (isset ($current[$tag . '_attr'])) {
105
                        $current[$tag]['0_attr'] = $current[$tag . '_attr'];
106
                        unset ($current[$tag . '_attr']);
107
                    }
108
                }
109
                $last_item_index = $repeated_tag_index[$tag . '_' . $level] - 1;
110
                $current = &$current[$tag][$last_item_index];
@@ 133-136 (lines=4) @@
130
                    );
131
                    $repeated_tag_index[$tag . '_' . $level] = 1;
132
                    if ($priority == 'tag' && $get_attributes) {
133
                        if (isset ($current[$tag . '_attr'])) {
134
                            $current[$tag]['0_attr'] = $current[$tag . '_attr'];
135
                            unset ($current[$tag . '_attr']);
136
                        }
137
                        if ($attributes_data) {
138
                            $current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data;
139
                        }