Code Duplication    Length = 7-9 lines in 3 locations

src/NodeVisitor/FunctionStmt/ScopeStaticCallStmtNodeVisitor.php 2 locations

@@ 76-84 (lines=9) @@
73
                $newNodeClass = new FullyQualified($node, $node->getAttributes());
74
75
                $prefix = (false === in_array((string) $newNodeClass, $this->whitelist));
76
            } else {
77
                $namespaceStatement = $this->namespaceStatements->getNamespaceName();
78
79
                $newNodeClass = FullyQualified::concat($namespaceStatement, $node, $node->getAttributes());
80
81
                if (false === in_array((string) $newNodeClass, $this->whitelist)) {
82
                    return $node;
83
                }
84
            }
85
        } else {
86
            $newNodeClass = FullyQualified::concat($useStatement, $node->slice(1), $node->getAttributes());
87
@@ 85-91 (lines=7) @@
82
                    return $node;
83
                }
84
            }
85
        } else {
86
            $newNodeClass = FullyQualified::concat($useStatement, $node->slice(1), $node->getAttributes());
87
88
            if (false === in_array((string) $newNodeClass, $this->whitelist)) {
89
                return $node;
90
            }
91
        }
92
93
        $newNodeClass->setAttribute('phpscoper_ignore', true);
94

src/NodeVisitor/ScopeConstStmtNodeVisitor.php 1 location

@@ 83-89 (lines=7) @@
80
81
        $newClassNode->setAttribute('phpscoper_ignore', true);
82
83
        if (in_array((string) $newClassNode, $this->whitelist)) {
84
            // Continue
85
        } elseif ($prefix) {
86
            $newClassNode = FullyQualified::concat($this->prefix, $newClassNode, $newClassNode->getAttributes());
87
        } else {
88
            return $node;
89
        }
90
91
        return new ClassConstFetch($newClassNode, $node->name, $node->getAttributes());
92
    }