Code Duplication    Length = 4-4 lines in 2 locations

core/Container/Container.php 1 location

@@ 132-135 (lines=4) @@
129
	 **/
130
	protected static function container_type_to_class( $type ) {
131
		$class = __NAMESPACE__ . '\\' . $type . '_Container';
132
		if ( ! class_exists( $class ) ) {
133
			Incorrect_Syntax_Exception::raise( 'Unknown container "' . $type . '".' );
134
			$class = __NAMESPACE__ . '\\Broken_Container';
135
		}
136
		return $class;
137
	}
138

core/Field/Field.php 1 location

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