Code Duplication    Length = 9-9 lines in 3 locations

src/Num.php 3 locations

@@ 351-359 (lines=9) @@
348
	 *
349
	 * @since 1.0.0
350
	 */
351
	public function formatPhone($string = '', $format = null)
352
	{
353
		if ($format === null)
354
		{
355
			$format = isset($this->config['phone']) ? $this->config['phone'] : '(000) 000-0000';
356
		}
357
358
		return $this->format($string, $format);
359
	}
360
361
	/**
362
	 * Formats a variable length phone number, using a standard format.
@@ 405-413 (lines=9) @@
402
	 *
403
	 * @since 1.0.0
404
	 */
405
	public function formatExp($string, $format = null)
406
	{
407
		if ($format === null)
408
		{
409
			$format = isset($this->config['exp']) ? $this->config['exp'] : '00-00';
410
		}
411
412
		return $this->format($string, $format);
413
	}
414
415
	/**
416
	 * Formats (masks) a credit card.
@@ 427-435 (lines=9) @@
424
	 *
425
	 * @since 1.0.0
426
	 */
427
	public function maskCreditCard($string, $format = null)
428
	{
429
		if ($format === null)
430
		{
431
			$format = isset($this->config['creditCard']) ? $this->config['creditCard'] : '**** **** **** 0000';
432
		}
433
434
		return $this->maskString($string, $format);
435
	}
436
}
437