Code Duplication    Length = 12-12 lines in 2 locations

packages/analyzer/src/Declarations.php 2 locations

@@ 103-114 (lines=12) @@
100
						$this->add( new Declarations\Class_Property( $file, $line, $class_name, $name, $static ) );
101
						break;
102
103
					case 'method':
104
						$params = json_decode( $params_json, TRUE );
105
						$declaration = new Declarations\Class_Method( $file, $line, $class_name, $name, $static );
106
						if ( is_array( $params ) ) {
107
							foreach( $params as $param ) {
108
								$declaration->add_param( $param->name, $param->default, $param->type, $param->byRef, $param->variadic );
109
							}
110
						}
111
112
						$this->add( $declaration );
113
114
						break;
115
116
					case 'function':
117
						$params = json_decode( $params_json, TRUE );
@@ 116-127 (lines=12) @@
113
114
						break;
115
116
					case 'function':
117
						$params = json_decode( $params_json, TRUE );
118
						$declaration = new Declarations\Function_( $file, $line, $name );
119
						if ( is_array( $params ) ) {
120
							foreach( $params as $param ) {
121
								$declaration->add_param( $param->name, $param->default, $param->type, $param->byRef, $param->variadic );
122
							}
123
						}
124
125
						$this->add( $declaration );
126
127
						break;
128
				}
129
				$row++;
130
			}