Code Duplication    Length = 16-16 lines in 2 locations

includes/class-give-translation.php 2 locations

@@ 188-203 (lines=16) @@
185
	 *
186
	 * @return string
187
	 */
188
	public static function add_label( $args = array() ) {
189
		// Set text params.
190
		$args = wp_parse_args(
191
			$args,
192
			array(
193
				'text'  => '',
194
				'id'    => '',
195
				'group' => '',
196
			)
197
		);
198
199
		$args['type'] = 'label';
200
		$args['id']   = "{$args['id']}_label";
201
202
		return self::add_text( $args );
203
	}
204
205
	/**
206
	 * Add tooltip by group ( if any )
@@ 215-230 (lines=16) @@
212
	 *
213
	 * @return string
214
	 */
215
	public static function add_tooltip( $args = array() ) {
216
		// Set text params.
217
		$args = wp_parse_args(
218
			$args,
219
			array(
220
				'text'  => '',
221
				'id'    => '',
222
				'group' => '',
223
			)
224
		);
225
226
		$args['type'] = 'tooltip';
227
		$args['id']   = "{$args['id']}_tooltip";
228
229
		return self::add_text( $args );
230
	}
231
232
	/**
233
	 * Add translation by group ( if any )