Code Duplication    Length = 5-5 lines in 2 locations

src/Server.php 1 location

@@ 615-619 (lines=5) @@
612
        }
613
614
        if (is_array($func)) {
615
            if (is_object($func[0])) {
616
                $funcName = get_class($func[0]) . '->' . $func[1];
617
            } else {
618
                $funcName = implode('::', $func);
619
            }
620
        } else if ($func instanceof \Closure) {
621
            $funcName = 'Closure';
622
        } else {

src/Wrapper.php 1 location

@@ 164-168 (lines=5) @@
161
                error_log('XML-RPC: ' . __METHOD__ . ': syntax for function to be wrapped is wrong');
162
                return false;
163
            }
164
            if (is_string($callable[0])) {
165
                $plainFuncName = implode('::', $callable);
166
            } elseif (is_object($callable[0])) {
167
                $plainFuncName = get_class($callable[0]) . '->' . $callable[1];
168
            }
169
            $exists = method_exists($callable[0], $callable[1]);
170
        } else if ($callable instanceof \Closure) {
171
            // we do not support creating code which wraps closures, as php does not allow to serialize them