Code Duplication    Length = 6-6 lines in 9 locations

packages/device-detection/src/class-user-agent-info.php 9 locations

@@ 239-244 (lines=6) @@
236
			$this->isTierIphone        = true;
237
			$this->isTierRichCss       = false;
238
			$this->isTierGenericMobile = false;
239
		} elseif ( $this->is_android() ) {
240
			$this->matched_agent       = 'android';
241
			$this->isTierIphone        = true;
242
			$this->isTierRichCss       = false;
243
			$this->isTierGenericMobile = false;
244
		} elseif ( $this->is_windows_phone_8() ) {
245
			$this->matched_agent       = 'winphone8';
246
			$this->isTierIphone        = true;
247
			$this->isTierRichCss       = false;
@@ 249-254 (lines=6) @@
246
			$this->isTierIphone        = true;
247
			$this->isTierRichCss       = false;
248
			$this->isTierGenericMobile = false;
249
		} elseif ( $this->is_WindowsPhone7() ) {
250
			$this->matched_agent       = 'win7';
251
			$this->isTierIphone        = true;
252
			$this->isTierRichCss       = false;
253
			$this->isTierGenericMobile = false;
254
		} elseif ( $this->is_blackberry_10() ) {
255
			$this->matched_agent       = 'blackberry-10';
256
			$this->isTierIphone        = true;
257
			$this->isTierRichCss       = false;
@@ 259-264 (lines=6) @@
256
			$this->isTierIphone        = true;
257
			$this->isTierRichCss       = false;
258
			$this->isTierGenericMobile = false;
259
		} elseif ( $this->is_blackbeberry() && $this->detect_blackberry_browser_version() == 'blackberry-webkit' ) {
260
			$this->matched_agent       = 'blackberry-webkit';
261
			$this->isTierIphone        = true;
262
			$this->isTierRichCss       = false;
263
			$this->isTierGenericMobile = false;
264
		} elseif ( $this->is_blackberry_tablet() ) {
265
			$this->matched_agent       = 'blackberry_tablet';
266
			$this->isTierIphone        = true;
267
			$this->isTierRichCss       = false;
@@ 269-274 (lines=6) @@
266
			$this->isTierIphone        = true;
267
			$this->isTierRichCss       = false;
268
			$this->isTierGenericMobile = false;
269
		} elseif ( $this->is_PalmWebOS() ) {
270
			$this->matched_agent       = 'webos';
271
			$this->isTierIphone        = true;
272
			$this->isTierRichCss       = false;
273
			$this->isTierGenericMobile = false;
274
		} elseif ( $this->is_TouchPad() ) {
275
			$this->matched_agent       = 'hp_tablet';
276
			$this->isTierIphone        = true;
277
			$this->isTierRichCss       = false;
@@ 279-284 (lines=6) @@
276
			$this->isTierIphone        = true;
277
			$this->isTierRichCss       = false;
278
			$this->isTierGenericMobile = false;
279
		} elseif ( $this->is_firefox_os() ) {
280
			$this->matched_agent       = 'firefoxOS';
281
			$this->isTierIphone        = true;
282
			$this->isTierRichCss       = false;
283
			$this->isTierGenericMobile = false;
284
		} elseif ( $this->is_firefox_mobile() ) {
285
			$this->matched_agent       = 'fennec';
286
			$this->isTierIphone        = true;
287
			$this->isTierRichCss       = false;
@@ 289-294 (lines=6) @@
286
			$this->isTierIphone        = true;
287
			$this->isTierRichCss       = false;
288
			$this->isTierGenericMobile = false;
289
		} elseif ( $this->is_opera_mobile() ) {
290
			$this->matched_agent       = 'opera-mobi';
291
			$this->isTierIphone        = true;
292
			$this->isTierRichCss       = false;
293
			$this->isTierGenericMobile = false;
294
		} elseif ( $this->is_MaemoTablet() ) {
295
			$this->matched_agent       = 'maemo';
296
			$this->isTierIphone        = true;
297
			$this->isTierRichCss       = false;
@@ 299-304 (lines=6) @@
296
			$this->isTierIphone        = true;
297
			$this->isTierRichCss       = false;
298
			$this->isTierGenericMobile = false;
299
		} elseif ( $this->is_MeeGo() ) {
300
			$this->matched_agent       = 'meego';
301
			$this->isTierIphone        = true;
302
			$this->isTierRichCss       = false;
303
			$this->isTierGenericMobile = false;
304
		} elseif ( $this->is_kindle_touch() ) {
305
			$this->matched_agent       = 'kindle-touch';
306
			$this->isTierIphone        = true;
307
			$this->isTierRichCss       = false;
@@ 309-314 (lines=6) @@
306
			$this->isTierIphone        = true;
307
			$this->isTierRichCss       = false;
308
			$this->isTierGenericMobile = false;
309
		} elseif ( $this->is_Nintendo_3DS() ) {
310
			$this->matched_agent       = 'nintendo-3ds';
311
			$this->isTierIphone        = true;
312
			$this->isTierRichCss       = false;
313
			$this->isTierGenericMobile = false;
314
		} else {
315
			$this->isTierIphone = false;
316
		}
317
		return $this->isTierIphone;
@@ 340-345 (lines=6) @@
337
			$this->isTierIphone        = false;
338
			$this->isTierRichCss       = true;
339
			$this->isTierGenericMobile = false;
340
		} elseif ( $this->is_opera_mini() ) {
341
			$this->matched_agent       = 'opera-mini';
342
			$this->isTierIphone        = false;
343
			$this->isTierRichCss       = true;
344
			$this->isTierGenericMobile = false;
345
		} elseif ( $this->is_blackbeberry() ) {
346
			$detectedDevice = $this->detect_blackberry_browser_version();
347
			if ( $detectedDevice === 'blackberry-5' || $detectedDevice == 'blackberry-4.7' || $detectedDevice === 'blackberry-4.6' ) {
348
				$this->matched_agent       = $detectedDevice;