Code Duplication    Length = 6-11 lines in 3 locations

src/Parser.php 2 locations

@@ 189-194 (lines=6) @@
186
        if ($this->case_folding === true) {
187
            $name = strtolower($name);
188
189
            if (count($attr)) {
190
                $attr = array_combine(
191
                    array_map('strtolower', array_keys($attr)),
192
                    array_values($attr)
193
                );
194
            }
195
        }
196
197
        if (count($attr)) {
@@ 197-202 (lines=6) @@
194
            }
195
        }
196
197
        if (count($attr)) {
198
            $attr = array_combine(
199
                array_map(array($this, "applyUserPrefix"), array_keys($attr)),
200
                array_values($attr)
201
            );
202
        }
203
204
        // Handle XML namespace declarations:
205

src/Visitor.php 1 location

@@ 159-169 (lines=11) @@
156
157
        if (count($attr) === 0) {
158
            $params = array();
159
        } else {
160
            $params = array_combine(
161
                array_map(
162
                    function ($key) {
163
                        return strtr($key, '-.', '__');
164
                    },
165
                    array_keys($attr)
166
                ),
167
                array_values($attr)
168
            );
169
        }
170
171
        return $this->dispatchFunction($this->path, $params);
172
    }