Code Duplication    Length = 4-8 lines in 2 locations

src/Request.php 1 location

@@ 188-191 (lines=4) @@
185
186
        $this->httpResponse = array('raw_data' => $data, 'headers' => array(), 'cookies' => array());
187
188
        if ($data == '') {
189
            Logger::instance()->errorLog('XML-RPC: ' . __METHOD__ . ': no response received from server.');
190
            return new Response(0, PhpXmlRpc::$xmlrpcerr['no_data'], PhpXmlRpc::$xmlrpcstr['no_data']);
191
        }
192
193
        // parse the HTTP headers of the response, if present, and separate them from data
194
        if (substr($data, 0, 4) == 'HTTP') {

src/Server.php 1 location

@@ 617-624 (lines=8) @@
614
        }
615
616
        // verify that function to be invoked is in fact callable
617
        if (!is_callable($func)) {
618
            Logger::instance()->errorLog("XML-RPC: " . __METHOD__ . ": function '$funcName' registered as method handler is not callable");
619
            return new Response(
620
                0,
621
                PhpXmlRpc::$xmlrpcerr['server_error'],
622
                PhpXmlRpc::$xmlrpcstr['server_error'] . ": no function matches method"
623
            );
624
        }
625
626
        // If debug level is 3, we should catch all errors generated during
627
        // processing of user function, and log them as part of response