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

@@ 182-185 (lines=4) @@
179
180
		$class = __NAMESPACE__ . '\\' . $type . '_Field';
181
182
		if ( ! class_exists( $class ) ) {
183
			Incorrect_Syntax_Exception::raise( 'Unknown field "' . $type . '".' );
184
			$class = __NAMESPACE__ . '\\Broken_Field';
185
		}
186
187
		if ( strpos( $name, '-' ) !== false ) {
188
			Incorrect_Syntax_Exception::raise( 'Forbidden character "-" in name "' . $name . '".' );