Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 41-43 (lines=3) @@
38
				return;
39
			}
40
			$method = new Class_Method( $this->current_relative_path, $node->getLine(), $this->current_class, $node->name->name, $node->isStatic() );
41
			foreach ( $node->getParams() as $param ) {
42
				$method->add_param( $param->var->name, $param->default, $param->type, $param->byRef, $param->variadic );
43
			}
44
			$this->declarations->add( $method );
45
			return;
46
		}
@@ 50-52 (lines=3) @@
47
48
		if ( $node instanceof Node\Stmt\Function_ ) {
49
			$function = new Function_( $this->current_relative_path, $node->getLine(), $node->name->name );
50
			foreach ( $node->getParams() as $param ) {
51
				$function->add_param( $param->var->name, $param->default, $param->type, $param->byRef, $param->variadic );
52
			}
53
			$this->declarations->add( $function  );
54
			return;
55
		}