Code Duplication    Length = 10-12 lines in 2 locations

src/Helper/XMLParser.php 2 locations

@@ 121-130 (lines=10) @@
118
                case 'BOOLEAN':
119
                case 'DOUBLE':
120
                case 'DATETIME.ISO8601':
121
                case 'BASE64':
122
                    if ($this->_xh['vt'] != 'value') {
123
                        // two data elements inside a value: an error occurred!
124
                        $this->_xh['isf'] = 2;
125
                        $this->_xh['isf_reason'] = "$name element following a {$this->_xh['vt']} element inside a single value";
126
127
                        return;
128
                    }
129
                    $this->_xh['ac'] = ''; // reset the accumulator
130
                    break;
131
                case 'STRUCT':
132
                case 'ARRAY':
133
                    if ($this->_xh['vt'] != 'value') {
@@ 182-193 (lines=12) @@
179
                    $this->_xh['vt'] = null;
180
                    break;
181
                case 'NIL':
182
                case 'EX:NIL':
183
                    if (PhpXmlRpc::$xmlrpc_null_extension) {
184
                        if ($this->_xh['vt'] != 'value') {
185
                            //two data elements inside a value: an error occurred!
186
                            $this->_xh['isf'] = 2;
187
                            $this->_xh['isf_reason'] = "$name element following a {$this->_xh['vt']} element inside a single value";
188
189
                            return;
190
                        }
191
                        $this->_xh['ac'] = ''; // reset the accumulator
192
                        break;
193
                    }
194
                // we do not support the <NIL/> extension, so
195
                // drop through intentionally
196
                default: