Code Duplication    Length = 4-4 lines in 2 locations

core/Field/Field.php 1 location

@@ 175-178 (lines=4) @@
172
173
		$class = __NAMESPACE__ . '\\' . $type . '_Field';
174
175
		if ( ! class_exists( $class ) ) {
176
			Incorrect_Syntax_Exception::raise( 'Unknown field "' . $type . '".' );
177
			$class = __NAMESPACE__ . '\\Broken_Field';
178
		}
179
180
		$field = new $class( $name, $label );
181
		$field->type = $type;

core/Container/Container.php 1 location

@@ 144-147 (lines=4) @@
141
142
		$class = __NAMESPACE__ . '\\' . $type . '_Container';
143
144
		if ( ! class_exists( $class ) ) {
145
			Incorrect_Syntax_Exception::raise( 'Unknown container "' . $type . '".' );
146
			$class = __NAMESPACE__ . '\\Broken_Container';
147
		}
148
149
		$container = new $class( $name );
150
		$container->type = $type;