Code Duplication    Length = 10-10 lines in 2 locations

src/Proxy.php 2 locations

@@ 34-43 (lines=10) @@
31
            public static function __callStatic(string $name, array $args)
32
            {
33
                $rc = self::$rc;
34
                if (method_exists($rc->name, $name)) {
35
                    $rm = $rc->getMethod($name);
36
                    if (!$rm->isStatic()) {
37
                        throw new ProxyException(
38
                            "Non-static method called statically: " .
39
                            "$rc->name::$name()");
40
                    }
41
                    $rm->setAccessible(true);
42
                    return $rm->invokeArgs(null, $args);
43
                }
44
                if (method_exists($rc->name, '__callStatic')) {
45
                    return $rc->name::$name(...$args);
46
                }
@@ 54-63 (lines=10) @@
51
            private static function getStaticReflectionProperty(string $name) : \ReflectionProperty
52
            {
53
                $rc = self::$rc;
54
                if (property_exists($rc->name, $name)) {
55
                    $rp = $rc->getProperty($name);
56
                    if (!$rp->isStatic()) {
57
                        throw new ProxyException(
58
                            "Access to undeclared static property: " .
59
                            "$rc->name::\$$name");
60
                    }
61
                    $rp->setAccessible(true);
62
                    return $rp;
63
                }
64
                throw new ProxyException(
65
                    "Access to undeclared static property: " .
66
                    "$rc->name::\$$name");