Code Duplication    Length = 9-9 lines in 2 locations

core/Field/Group_Field.php 1 location

@@ 245-253 (lines=9) @@
242
	 * @param string $name
243
	 * @return boolean
244
	 */
245
	public function register_field_name( $name ) {
246
		if ( in_array( $name, $this->registered_field_names ) ) {
247
			Incorrect_Syntax_Exception::raise( 'Field name "' . $name . '" already registered' );
248
			return false;
249
		}
250
251
		$this->registered_field_names[] = $name;
252
		return true;
253
	}
254
}
255

core/Container/Container.php 1 location

@@ 540-548 (lines=9) @@
537
	 * @param string $name
538
	 * @return boolean
539
	 */
540
	protected function register_field_name( $name ) {
541
		if ( in_array( $name, $this->registered_field_names ) ) {
542
			Incorrect_Syntax_Exception::raise( 'Field name "' . $name . '" already registered' );
543
			return false;
544
		}
545
546
		$this->registered_field_names[] = $name;
547
		return true;
548
	}
549
550
	/**
551
	 * Return whether the datastore instance is the default one or has been overriden