Code Duplication    Length = 9-9 lines in 2 locations

core/Container/Container.php 1 location

@@ 528-536 (lines=9) @@
525
	 * @param string $name
526
	 * @return boolean
527
	 */
528
	protected function register_field_name( $name ) {
529
		if ( in_array( $name, $this->registered_field_names ) ) {
530
			Incorrect_Syntax_Exception::raise( 'Field name "' . $name . '" already registered' );
531
			return false;
532
		}
533
534
		$this->registered_field_names[] = $name;
535
		return true;
536
	}
537
538
	/**
539
	 * Return whether the datastore instance is the default one or has been overriden

core/Field/Group_Field.php 1 location

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