Code Duplication    Length = 6-6 lines in 9 locations

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

@@ 372-377 (lines=6) @@
369
			$this->isTierIphone        = true;
370
			$this->isTierRichCss       = false;
371
			$this->isTierGenericMobile = false;
372
		} elseif ( $this->is_android() ) {
373
			$this->matched_agent       = 'android';
374
			$this->isTierIphone        = true;
375
			$this->isTierRichCss       = false;
376
			$this->isTierGenericMobile = false;
377
		} elseif ( $this->is_windows_phone_8() ) {
378
			$this->matched_agent       = 'winphone8';
379
			$this->isTierIphone        = true;
380
			$this->isTierRichCss       = false;
@@ 382-387 (lines=6) @@
379
			$this->isTierIphone        = true;
380
			$this->isTierRichCss       = false;
381
			$this->isTierGenericMobile = false;
382
		} elseif ( $this->is_WindowsPhone7() ) {
383
			$this->matched_agent       = 'win7';
384
			$this->isTierIphone        = true;
385
			$this->isTierRichCss       = false;
386
			$this->isTierGenericMobile = false;
387
		} elseif ( $this->is_blackberry_10() ) {
388
			$this->matched_agent       = 'blackberry-10';
389
			$this->isTierIphone        = true;
390
			$this->isTierRichCss       = false;
@@ 392-397 (lines=6) @@
389
			$this->isTierIphone        = true;
390
			$this->isTierRichCss       = false;
391
			$this->isTierGenericMobile = false;
392
		} elseif ( $this->is_blackbeberry() && $this->detect_blackberry_browser_version() == 'blackberry-webkit' ) {
393
			$this->matched_agent       = 'blackberry-webkit';
394
			$this->isTierIphone        = true;
395
			$this->isTierRichCss       = false;
396
			$this->isTierGenericMobile = false;
397
		} elseif ( $this->is_blackberry_tablet() ) {
398
			$this->matched_agent       = 'blackberry_tablet';
399
			$this->isTierIphone        = true;
400
			$this->isTierRichCss       = false;
@@ 402-407 (lines=6) @@
399
			$this->isTierIphone        = true;
400
			$this->isTierRichCss       = false;
401
			$this->isTierGenericMobile = false;
402
		} elseif ( $this->is_PalmWebOS() ) {
403
			$this->matched_agent       = 'webos';
404
			$this->isTierIphone        = true;
405
			$this->isTierRichCss       = false;
406
			$this->isTierGenericMobile = false;
407
		} elseif ( $this->is_TouchPad() ) {
408
			$this->matched_agent       = 'hp_tablet';
409
			$this->isTierIphone        = true;
410
			$this->isTierRichCss       = false;
@@ 412-417 (lines=6) @@
409
			$this->isTierIphone        = true;
410
			$this->isTierRichCss       = false;
411
			$this->isTierGenericMobile = false;
412
		} elseif ( $this->is_firefox_os() ) {
413
			$this->matched_agent       = 'firefoxOS';
414
			$this->isTierIphone        = true;
415
			$this->isTierRichCss       = false;
416
			$this->isTierGenericMobile = false;
417
		} elseif ( $this->is_firefox_mobile() ) {
418
			$this->matched_agent       = 'fennec';
419
			$this->isTierIphone        = true;
420
			$this->isTierRichCss       = false;
@@ 422-427 (lines=6) @@
419
			$this->isTierIphone        = true;
420
			$this->isTierRichCss       = false;
421
			$this->isTierGenericMobile = false;
422
		} elseif ( $this->is_opera_mobile() ) {
423
			$this->matched_agent       = 'opera-mobi';
424
			$this->isTierIphone        = true;
425
			$this->isTierRichCss       = false;
426
			$this->isTierGenericMobile = false;
427
		} elseif ( $this->is_MaemoTablet() ) {
428
			$this->matched_agent       = 'maemo';
429
			$this->isTierIphone        = true;
430
			$this->isTierRichCss       = false;
@@ 432-437 (lines=6) @@
429
			$this->isTierIphone        = true;
430
			$this->isTierRichCss       = false;
431
			$this->isTierGenericMobile = false;
432
		} elseif ( $this->is_MeeGo() ) {
433
			$this->matched_agent       = 'meego';
434
			$this->isTierIphone        = true;
435
			$this->isTierRichCss       = false;
436
			$this->isTierGenericMobile = false;
437
		} elseif ( $this->is_kindle_touch() ) {
438
			$this->matched_agent       = 'kindle-touch';
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_Nintendo_3DS() ) {
443
			$this->matched_agent       = 'nintendo-3ds';
444
			$this->isTierIphone        = true;
445
			$this->isTierRichCss       = false;
446
			$this->isTierGenericMobile = false;
447
		} else {
448
			$this->isTierIphone = false;
449
		}
450
		return $this->isTierIphone;
@@ 473-478 (lines=6) @@
470
			$this->isTierIphone        = false;
471
			$this->isTierRichCss       = true;
472
			$this->isTierGenericMobile = false;
473
		} elseif ( $this->is_opera_mini() ) {
474
			$this->matched_agent       = 'opera-mini';
475
			$this->isTierIphone        = false;
476
			$this->isTierRichCss       = true;
477
			$this->isTierGenericMobile = false;
478
		} elseif ( $this->is_blackbeberry() ) {
479
			$detectedDevice = $this->detect_blackberry_browser_version();
480
			if ( $detectedDevice === 'blackberry-5' || $detectedDevice == 'blackberry-4.7' || $detectedDevice === 'blackberry-4.6' ) {
481
				$this->matched_agent       = $detectedDevice;