Code Duplication    Length = 5-5 lines in 2 locations

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

src/Server.php 1 location

@@ 606-610 (lines=5) @@
603
        }
604
605
        if (is_array($func)) {
606
            if (is_object($func[0])) {
607
                $funcName = get_class($func[0]) . '->' . $func[1];
608
            } else {
609
                $funcName = implode('::', $func);
610
            }
611
        } else if ($func instanceof \Closure) {
612
            $funcName = 'Closure';
613
        } else {