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
		if ( strpos( $name, '-' ) !== false ) {
181
			Incorrect_Syntax_Exception::raise( 'Forbidden character "-" in name "' . $name . '".' );

core/Container/Container.php 1 location

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