Code Duplication    Length = 3-8 lines in 2 locations

packages/analyzer/src/Invocations/Visitor.php 1 location

@@ 36-38 (lines=3) @@
33
			// TODO - args
34
			if ( $node->name instanceof Node\Expr\Variable ) {
35
				$function_name = '$' . Utils::maybe_stringify( $node->name->name );
36
			} elseif ( $node->name instanceof Node\Expr\ArrayDimFetch ) {
37
				$function_name = '$' . Utils::maybe_stringify( $node->name->var->name ) . '[' . Utils::maybe_stringify( $node->name->dim->value ) . ']';
38
			} else {
39
				$function_name = implode( '\\', $node->name->parts );
40
			}
41

packages/analyzer/src/Utils.php 1 location

@@ 45-52 (lines=8) @@
42
						'$'
43
						. self::maybe_stringify( $node->var->name )
44
						. '->' . self::maybe_stringify( $node->name->name );
45
		} elseif ( $node instanceof Node\Expr\ArrayDimFetch ) {
46
47
			$class_name =
48
						'$'
49
						. self::maybe_stringify( $node->var->name )
50
						. '[' . self::maybe_stringify( $node->dim->value )
51
						. ']';
52
		} else {
53
			if ( method_exists( $node, 'toCodeString' ) ) {
54
				$class_name = $node->toCodeString();
55
			} else {