Code Duplication    Length = 9-9 lines in 2 locations

src/Visitor/AddProxiedMethods.php 1 location

@@ 56-64 (lines=9) @@
53
        return $node;
54
    }
55
56
    private function buildCloneExpression(): Node\Stmt\Expression
57
    {
58
        return new Node\Stmt\Expression(
59
            new Node\Expr\Assign(
60
                Expressions::resolvePropertyFetch('this', $this->resolverProperty),
61
                new Node\Expr\Clone_(Expressions::resolvePropertyFetch('this', $this->resolverProperty))
62
            )
63
        );
64
    }
65
66
    private function modifyReturnMethod(Node\Stmt\ClassMethod $method): Node\Stmt\ClassMethod
67
    {

src/Visitor/AddMagicCloneMethod.php 1 location

@@ 40-48 (lines=9) @@
37
        return null;
38
    }
39
40
    private function buildCloneExpression(): Node\Stmt\Expression
41
    {
42
        return new Node\Stmt\Expression(
43
            new Node\Expr\Assign(
44
                Expressions::resolvePropertyFetch('this', $this->resolverProperty),
45
                new Node\Expr\Clone_(Expressions::resolvePropertyFetch('this', $this->resolverProperty))
46
            )
47
        );
48
    }
49
}