Code Duplication    Length = 17-17 lines in 2 locations

includes/CMB2_Base.php 1 location

@@ 163-179 (lines=17) @@
160
	 * @param  CMB2_Field $field_group (optional) CMB2_Field object (group parent)
161
	 * @return array                   Array of field arguments.
162
	 */
163
	protected function get_default_args( $field_args, $field_group = null ) {
164
		if ( $field_group ) {
165
			$args = array(
166
				'field_args'  => $field_args,
167
				'group_field' => $field_group,
168
			);
169
		} else {
170
			$args = array(
171
				'field_args'  => $field_args,
172
				'object_type' => $this->object_type(),
173
				'object_id'   => $this->object_id(),
174
				'cmb_id'      => $this->cmb_id,
175
			);
176
		}
177
178
		return $args;
179
	}
180
181
	/**
182
	 * Get a new field object specific to this CMB2 object.

includes/CMB2.php 1 location

@@ 980-996 (lines=17) @@
977
	 * @param  CMB2_Field $field_group (optional) CMB2_Field object (group parent)
978
	 * @return array                   Array of field arguments.
979
	 */
980
	protected function get_default_args( $field_args, $field_group = null ) {
981
		if ( $field_group ) {
982
			$args = array(
983
				'field_args'  => $field_args,
984
				'group_field' => $field_group,
985
			);
986
		} else {
987
			$args = array(
988
				'field_args'  => $field_args,
989
				'object_type' => $this->object_type(),
990
				'object_id'   => $this->object_id(),
991
				'cmb_id'      => $this->cmb_id,
992
			);
993
		}
994
995
		return $args;
996
	}
997
998
	/**
999
	 * Get a new field object specific to this CMB2 object.