Code Duplication    Length = 17-17 lines in 2 locations

includes/CMB2_Base.php 1 location

@@ 180-196 (lines=17) @@
177
	 * @param  CMB2_Field $field_group (optional) CMB2_Field object (group parent)
178
	 * @return array                   Array of field arguments.
179
	 */
180
	protected function get_default_args( $field_args, $field_group = null ) {
181
		if ( $field_group ) {
182
			$args = array(
183
				'field_args'  => $field_args,
184
				'group_field' => $field_group,
185
			);
186
		} else {
187
			$args = array(
188
				'field_args'  => $field_args,
189
				'object_type' => $this->object_type(),
190
				'object_id'   => $this->object_id(),
191
				'cmb_id'      => $this->cmb_id,
192
			);
193
		}
194
195
		return $args;
196
	}
197
198
	/**
199
	 * Get a new field object specific to this CMB2 object.

includes/CMB2.php 1 location

@@ 1054-1070 (lines=17) @@
1051
	 * @param  CMB2_Field $field_group (optional) CMB2_Field object (group parent)
1052
	 * @return array                   Array of field arguments.
1053
	 */
1054
	protected function get_default_args( $field_args, $field_group = null ) {
1055
		if ( $field_group ) {
1056
			$args = array(
1057
				'field_args'  => $field_args,
1058
				'group_field' => $field_group,
1059
			);
1060
		} else {
1061
			$args = array(
1062
				'field_args'  => $field_args,
1063
				'object_type' => $this->object_type(),
1064
				'object_id'   => $this->object_id(),
1065
				'cmb_id'      => $this->cmb_id,
1066
			);
1067
		}
1068
1069
		return $args;
1070
	}
1071
1072
	/**
1073
	 * Get a new field object specific to this CMB2 object.