Code Duplication    Length = 4-4 lines in 2 locations

core/Container/Container.php 1 location

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

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 . '".' );