Code Duplication    Length = 17-17 lines in 2 locations

includes/CMB2_Base.php 1 location

@@ 193-209 (lines=17) @@
190
	 * @param  CMB2_Field $field_group (optional) CMB2_Field object (group parent)
191
	 * @return array                   Array of field arguments.
192
	 */
193
	protected function get_default_args( $field_args, $field_group = null ) {
194
		if ( $field_group ) {
195
			$args = array(
196
				'field_args'  => $field_args,
197
				'group_field' => $field_group,
198
			);
199
		} else {
200
			$args = array(
201
				'field_args'  => $field_args,
202
				'object_type' => $this->object_type(),
203
				'object_id'   => $this->object_id(),
204
				'cmb_id'      => $this->cmb_id,
205
			);
206
		}
207
208
		return $args;
209
	}
210
211
	/**
212
	 * Get a new field object specific to this CMB2 object.

includes/CMB2.php 1 location

@@ 1116-1132 (lines=17) @@
1113
	 * @param  CMB2_Field $field_group (optional) CMB2_Field object (group parent).
1114
	 * @return array                   Array of field arguments.
1115
	 */
1116
	protected function get_default_args( $field_args, $field_group = null ) {
1117
		if ( $field_group ) {
1118
			$args = array(
1119
				'field_args'  => $field_args,
1120
				'group_field' => $field_group,
1121
			);
1122
		} else {
1123
			$args = array(
1124
				'field_args'  => $field_args,
1125
				'object_type' => $this->object_type(),
1126
				'object_id'   => $this->object_id(),
1127
				'cmb_id'      => $this->cmb_id,
1128
			);
1129
		}
1130
1131
		return $args;
1132
	}
1133
1134
	/**
1135
	 * Get a new field object specific to this CMB2 object.