Code Duplication    Length = 6-6 lines in 9 locations

packages/device-detection/src/class-device-detection.php 9 locations

@@ 432-437 (lines=6) @@
429
			$this->isTierIphone        = true;
430
			$this->isTierRichCss       = false;
431
			$this->isTierGenericMobile = false;
432
		} elseif ( $this->is_android() ) {
433
			$this->matched_agent       = 'android';
434
			$this->isTierIphone        = true;
435
			$this->isTierRichCss       = false;
436
			$this->isTierGenericMobile = false;
437
		} elseif ( $this->is_windows_phone_8() ) {
438
			$this->matched_agent       = 'winphone8';
439
			$this->isTierIphone        = true;
440
			$this->isTierRichCss       = false;
@@ 442-447 (lines=6) @@
439
			$this->isTierIphone        = true;
440
			$this->isTierRichCss       = false;
441
			$this->isTierGenericMobile = false;
442
		} elseif ( $this->is_WindowsPhone7() ) {
443
			$this->matched_agent       = 'win7';
444
			$this->isTierIphone        = true;
445
			$this->isTierRichCss       = false;
446
			$this->isTierGenericMobile = false;
447
		} elseif ( $this->is_blackberry_10() ) {
448
			$this->matched_agent       = 'blackberry-10';
449
			$this->isTierIphone        = true;
450
			$this->isTierRichCss       = false;
@@ 452-457 (lines=6) @@
449
			$this->isTierIphone        = true;
450
			$this->isTierRichCss       = false;
451
			$this->isTierGenericMobile = false;
452
		} elseif ( $this->is_blackbeberry() && $this->detect_blackberry_browser_version() == 'blackberry-webkit' ) {
453
			$this->matched_agent       = 'blackberry-webkit';
454
			$this->isTierIphone        = true;
455
			$this->isTierRichCss       = false;
456
			$this->isTierGenericMobile = false;
457
		} elseif ( $this->is_blackberry_tablet() ) {
458
			$this->matched_agent       = 'blackberry_tablet';
459
			$this->isTierIphone        = true;
460
			$this->isTierRichCss       = false;
@@ 462-467 (lines=6) @@
459
			$this->isTierIphone        = true;
460
			$this->isTierRichCss       = false;
461
			$this->isTierGenericMobile = false;
462
		} elseif ( $this->is_PalmWebOS() ) {
463
			$this->matched_agent       = 'webos';
464
			$this->isTierIphone        = true;
465
			$this->isTierRichCss       = false;
466
			$this->isTierGenericMobile = false;
467
		} elseif ( $this->is_TouchPad() ) {
468
			$this->matched_agent       = 'hp_tablet';
469
			$this->isTierIphone        = true;
470
			$this->isTierRichCss       = false;
@@ 472-477 (lines=6) @@
469
			$this->isTierIphone        = true;
470
			$this->isTierRichCss       = false;
471
			$this->isTierGenericMobile = false;
472
		} elseif ( $this->is_firefox_os() ) {
473
			$this->matched_agent       = 'firefoxOS';
474
			$this->isTierIphone        = true;
475
			$this->isTierRichCss       = false;
476
			$this->isTierGenericMobile = false;
477
		} elseif ( $this->is_firefox_mobile() ) {
478
			$this->matched_agent       = 'fennec';
479
			$this->isTierIphone        = true;
480
			$this->isTierRichCss       = false;
@@ 482-487 (lines=6) @@
479
			$this->isTierIphone        = true;
480
			$this->isTierRichCss       = false;
481
			$this->isTierGenericMobile = false;
482
		} elseif ( $this->is_opera_mobile() ) {
483
			$this->matched_agent       = 'opera-mobi';
484
			$this->isTierIphone        = true;
485
			$this->isTierRichCss       = false;
486
			$this->isTierGenericMobile = false;
487
		} elseif ( $this->is_MaemoTablet() ) {
488
			$this->matched_agent       = 'maemo';
489
			$this->isTierIphone        = true;
490
			$this->isTierRichCss       = false;
@@ 492-497 (lines=6) @@
489
			$this->isTierIphone        = true;
490
			$this->isTierRichCss       = false;
491
			$this->isTierGenericMobile = false;
492
		} elseif ( $this->is_MeeGo() ) {
493
			$this->matched_agent       = 'meego';
494
			$this->isTierIphone        = true;
495
			$this->isTierRichCss       = false;
496
			$this->isTierGenericMobile = false;
497
		} elseif ( $this->is_kindle_touch() ) {
498
			$this->matched_agent       = 'kindle-touch';
499
			$this->isTierIphone        = true;
500
			$this->isTierRichCss       = false;
@@ 502-507 (lines=6) @@
499
			$this->isTierIphone        = true;
500
			$this->isTierRichCss       = false;
501
			$this->isTierGenericMobile = false;
502
		} elseif ( $this->is_Nintendo_3DS() ) {
503
			$this->matched_agent       = 'nintendo-3ds';
504
			$this->isTierIphone        = true;
505
			$this->isTierRichCss       = false;
506
			$this->isTierGenericMobile = false;
507
		} else {
508
			$this->isTierIphone = false;
509
		}
510
		return $this->isTierIphone;
@@ 533-538 (lines=6) @@
530
			$this->isTierIphone        = false;
531
			$this->isTierRichCss       = true;
532
			$this->isTierGenericMobile = false;
533
		} elseif ( $this->is_opera_mini() ) {
534
			$this->matched_agent       = 'opera-mini';
535
			$this->isTierIphone        = false;
536
			$this->isTierRichCss       = true;
537
			$this->isTierGenericMobile = false;
538
		} elseif ( $this->is_blackbeberry() ) {
539
			$detectedDevice = $this->detect_blackberry_browser_version();
540
			if ( $detectedDevice === 'blackberry-5' || $detectedDevice == 'blackberry-4.7' || $detectedDevice === 'blackberry-4.6' ) {
541
				$this->matched_agent       = $detectedDevice;