Code Duplication    Length = 3-3 lines in 2 locations

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

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