Code Duplication    Length = 17-17 lines in 2 locations

includes/CMB2.php 1 location

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

includes/CMB2_Base.php 1 location

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