Code Duplication    Length = 4-4 lines in 2 locations

core/Field/Field.php 1 location

@@ 217-220 (lines=4) @@
214
			}
215
		}
216
217
		if ( ! class_exists( $class ) ) {
218
			Incorrect_Syntax_Exception::raise( 'Unknown field "' . $type . '".' );
219
			$class = __NAMESPACE__ . '\\Broken_Field';
220
		}
221
222
		$field = new $class( $type, $name, $label );
223

core/Container/Container.php 1 location

@@ 156-159 (lines=4) @@
153
		$normalized_type = Helper::normalize_type( $type );
154
		$class = Helper::type_to_class( $normalized_type, __NAMESPACE__, '_Container' );
155
156
		if ( ! class_exists( $class ) ) {
157
			Incorrect_Syntax_Exception::raise( 'Unknown container "' . $type . '".' );
158
			$class = __NAMESPACE__ . '\\Broken_Container';
159
		}
160
161
		$repository = \Carbon_Fields\Carbon_Fields::resolve( 'container_repository' );
162
		$unique_id = $repository->get_unique_panel_id( $name );