Code Duplication    Length = 8-10 lines in 2 locations

src/Hal/Metric/Class_/Coupling/ExternalsVisitor.php 1 location

@@ 100-109 (lines=10) @@
97
98
                    // instantiations, static calls
99
                    \iterate_over_node($stmt, function ($node) use (&$dependencies) {
100
                        switch (true) {
101
                            case $node instanceof Node\Expr\New_:
102
                                // new MyClass
103
                                array_push($dependencies, getNameOfNode($node));
104
                                break;
105
                            case $node instanceof Node\Expr\StaticCall:
106
                                // MyClass::Call
107
                                array_push($dependencies, getNameOfNode($node));
108
                                break;
109
                        }
110
                    });
111
112
                    // annotations

src/Hal/Metric/Class_/Structural/SystemComplexityVisitor.php 1 location

@@ 57-64 (lines=8) @@
54
                    $fanout = [];
55
56
                    iterate_over_node($node, function ($node) use (&$output, &$fanout) {
57
                        switch (true) {
58
                            case $node instanceof Stmt\Return_:
59
                                $output++;
60
                                break;
61
                            case $node instanceof Node\Expr\StaticCall:
62
                            case $node instanceof Node\Expr\MethodCall:
63
                                array_push($fanout, getNameOfNode($node));
64
                        }
65
                    });
66
67
                    $fanout = sizeof(array_unique($fanout));