Code Duplication    Length = 5-8 lines in 2 locations

src/Request.php 1 location

@@ 290-297 (lines=8) @@
287
            }
288
        }
289
        // second error check: xml well formed but not xml-rpc compliant
290
        elseif ($xmlRpcParser->_xh['isf'] == 2) {
291
            if ($this->debug) {
292
                /// @todo echo something for user?
293
            }
294
295
            $r = new Response(0, PhpXmlRpc::$xmlrpcerr['invalid_return'],
296
                PhpXmlRpc::$xmlrpcstr['invalid_return'] . ' ' . $xmlRpcParser->_xh['isf_reason']);
297
        }
298
        // third error check: parsing of the response has somehow gone boink.
299
        // NB: shall we omit this check, since we trust the parsing code?
300
        elseif ($returnType == 'xmlrpcvals' && !is_object($xmlRpcParser->_xh['value'])) {

src/Server.php 1 location

@@ 514-518 (lines=5) @@
511
            $r = new Response(0,
512
                PhpXmlRpc::$xmlrpcerrxml + $matches[1],
513
                $xmlRpcParser->_xh['isf_reason']);
514
        } elseif ($xmlRpcParser->_xh['isf']) {
515
            $r = new Response(0,
516
                PhpXmlRpc::$xmlrpcerr['invalid_request'],
517
                PhpXmlRpc::$xmlrpcstr['invalid_request'] . ' ' . $xmlRpcParser->_xh['isf_reason']);
518
        } else {
519
            // small layering violation in favor of speed and memory usage:
520
            // we should allow the 'execute' method handle this, but in the
521
            // most common scenario (xmlrpc values type server with some methods