Code Duplication    Length = 11-11 lines in 2 locations

src/Visitor/AddProxiedMethods.php 2 locations

@@ 66-76 (lines=11) @@
63
        );
64
    }
65
66
    private function modifyReturnMethod(Node\Stmt\ClassMethod $method): Node\Stmt\ClassMethod
67
    {
68
        $method->setDocComment(PHPDoc::writeInheritdoc());
69
70
        $resolved = Expressions::resolveMethodCall('this', $this->resolverProperty, $this->resolveMethod);
71
        $stmt = new Node\Stmt\Return_(new Node\Expr\MethodCall($resolved, $method->name->name, $this->packMethodArgs($method)));
72
73
        $method->stmts[] = Expressions::throwExceptionOnNull($resolved, $stmt);
74
75
        return $method;
76
    }
77
78
    private function modifyExprMethod(Node\Stmt\ClassMethod $method): Node\Stmt\ClassMethod
79
    {
@@ 78-88 (lines=11) @@
75
        return $method;
76
    }
77
78
    private function modifyExprMethod(Node\Stmt\ClassMethod $method): Node\Stmt\ClassMethod
79
    {
80
        $method->setDocComment(PHPDoc::writeInheritdoc());
81
82
        $resolved = Expressions::resolveMethodCall('this', $this->resolverProperty, $this->resolveMethod);
83
        $stmt = new Node\Stmt\Expression(new Node\Expr\MethodCall($resolved, $method->name->name, $this->packMethodArgs($method)));
84
85
        $method->stmts[] = Expressions::throwExceptionOnNull($resolved, $stmt);
86
87
        return $method;
88
    }
89
90
    private function packMethodArgs(Node\Stmt\ClassMethod $method): array
91
    {