Code Duplication    Length = 12-12 lines in 3 locations

src/Promise/Visitor/AddPropertiesConst.php 1 location

@@ 43-54 (lines=12) @@
40
    /**
41
     * {@inheritdoc}
42
     */
43
    public function leaveNode(Node $node)
44
    {
45
        if ($node instanceof Node\Stmt\Class_) {
46
            $node->stmts = inject(
47
                $node->stmts,
48
                Node\Stmt\ClassMethod::class,
49
                [$this->buildProperty()]
50
            );
51
        }
52
53
        return null;
54
    }
55
56
    /**
57
     * @return Node\Stmt\ClassConst

src/Promise/Visitor/AddResolverProperty.php 1 location

@@ 50-61 (lines=12) @@
47
    /**
48
     * {@inheritdoc}
49
     */
50
    public function leaveNode(Node $node)
51
    {
52
        if ($node instanceof Node\Stmt\Class_) {
53
            $node->stmts = inject(
54
                $node->stmts,
55
                Node\Stmt\ClassMethod::class,
56
                [$this->buildProperty()]
57
            );
58
        }
59
60
        return null;
61
    }
62
63
    /**
64
     * @return Node\Stmt\Property

src/Promise/Visitor/AddUseStmts.php 1 location

@@ 39-50 (lines=12) @@
36
    /**
37
     * {@inheritdoc}
38
     */
39
    public function leaveNode(Node $node)
40
    {
41
        if ($node instanceof Node\Stmt\Namespace_) {
42
            $node->stmts = inject(
43
                $node->stmts,
44
                Node\Stmt\Class_::class,
45
                $this->removeDuplicates($node->stmts, $this->buildUseStmts())
46
            );
47
        }
48
49
        return null;
50
    }
51
52
    /**
53
     * @param Node\Stmt[] $stmts