Code Duplication    Length = 17-17 lines in 2 locations

includes/CMB2.php 1 location

@@ 967-983 (lines=17) @@
964
	 * @param  CMB2_Field $field_group (optional) CMB2_Field object (group parent)
965
	 * @return array                   Array of field arguments.
966
	 */
967
	protected function get_default_args( $field_args, $field_group = null ) {
968
		if ( $field_group ) {
969
			$args = array(
970
				'field_args'  => $field_args,
971
				'group_field' => $field_group,
972
			);
973
		} else {
974
			$args = array(
975
				'field_args'  => $field_args,
976
				'object_type' => $this->object_type(),
977
				'object_id'   => $this->object_id(),
978
				'cmb_id'      => $this->cmb_id,
979
			);
980
		}
981
982
		return $args;
983
	}
984
985
	/**
986
	 * Get a new field object specific to this CMB2 object.

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.