Code Duplication    Length = 10-12 lines in 2 locations

src/Helper/XMLParser.php 2 locations

@@ 222-231 (lines=10) @@
219
                case 'BOOLEAN':
220
                case 'DOUBLE':
221
                case 'DATETIME.ISO8601':
222
                case 'BASE64':
223
                    if ($this->_xh['vt'] != 'value') {
224
                        // two data elements inside a value: an error occurred!
225
                        $this->_xh['isf'] = 2;
226
                        $this->_xh['isf_reason'] = "$name element following a {$this->_xh['vt']} element inside a single value";
227
228
                        return;
229
                    }
230
                    $this->_xh['ac'] = ''; // reset the accumulator
231
                    break;
232
                case 'STRUCT':
233
                case 'ARRAY':
234
                    if ($this->_xh['vt'] != 'value') {
@@ 284-295 (lines=12) @@
281
                    $this->_xh['vt'] = null;
282
                    break;
283
                case 'NIL':
284
                case 'EX:NIL':
285
                    if (PhpXmlRpc::$xmlrpc_null_extension) {
286
                        if ($this->_xh['vt'] != 'value') {
287
                            // two data elements inside a value: an error occurred!
288
                            $this->_xh['isf'] = 2;
289
                            $this->_xh['isf_reason'] = "$name element following a {$this->_xh['vt']} element inside a single value";
290
291
                            return;
292
                        }
293
                        $this->_xh['ac'] = ''; // reset the accumulator
294
                        break;
295
                    }
296
                // we do not support the <NIL/> extension, so
297
                // drop through intentionally
298
                default: