Code Duplication    Length = 3-3 lines in 2 locations

src/Encoder.php 1 location

@@ 289-291 (lines=3) @@
286
                return $r;
287
            case 'methodcall':
288
                $req = new Request($xmlRpcParser->_xh['method']);
289
                for ($i = 0; $i < count($xmlRpcParser->_xh['params']); $i++) {
290
                    $req->addParam($xmlRpcParser->_xh['params'][$i]);
291
                }
292
293
                return $req;
294
            case 'value':

src/Server.php 1 location

@@ 534-536 (lines=3) @@
531
                // build a Request object with data parsed from xml
532
                $req = new Request($xmlRpcParser->_xh['method']);
533
                // now add parameters in
534
                for ($i = 0; $i < count($xmlRpcParser->_xh['params']); $i++) {
535
                    $req->addParam($xmlRpcParser->_xh['params'][$i]);
536
                }
537
538
                if ($this->debug > 1) {
539
                    $this->debugmsg("\n+++PARSED+++\n" . var_export($req, true) . "\n+++END+++");