Code Duplication    Length = 4-4 lines in 2 locations

packages/analyzer/src/Declarations/Visitor.php 2 locations

@@ 49-52 (lines=4) @@
46
				return;
47
			}
48
			$method = new Class_Method( $this->current_relative_path, $node->getLine(), $this->current_class, $node->name->name, $node->isStatic() );
49
			foreach ( $node->getParams() as $param ) {
50
				$param_default = Utils::get_param_default_as_string( $param->default, $this->current_class );
51
				$method->add_param( $param->var->name, $param_default, $param->type, $param->byRef, $param->variadic );
52
			}
53
			$this->declarations->add( $method );
54
			return;
55
		}
@@ 59-62 (lines=4) @@
56
57
		if ( $node instanceof Node\Stmt\Function_ ) {
58
			$function = new Function_( $this->current_relative_path, $node->getLine(), $node->name->name );
59
			foreach ( $node->getParams() as $param ) {
60
				$param_default = Utils::get_param_default_as_string( $param->default, $this->current_class );
61
				$function->add_param( $param->var->name, $param_default, $param->type, $param->byRef, $param->variadic );
62
			}
63
			$this->declarations->add( $function );
64
			return;
65
		}