Code Duplication    Length = 13-13 lines in 2 locations

packages/connection/src/Manager.php 2 locations

@@ 1362-1374 (lines=13) @@
1359
		}
1360
1361
		// No .test or .local domains.
1362
		if ( preg_match( '#\.(test|local)$#i', $domain ) ) {
1363
			return new \WP_Error(
1364
				'fail_domain_tld',
1365
				sprintf(
1366
					/* translators: %1$s is a domain name. */
1367
					__(
1368
						'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.',
1369
						'jetpack'
1370
					),
1371
					$domain
1372
				)
1373
			);
1374
		}
1375
1376
		// No WPCOM subdomains.
1377
		if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) {
@@ 1377-1389 (lines=13) @@
1374
		}
1375
1376
		// No WPCOM subdomains.
1377
		if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) {
1378
			return new \WP_Error(
1379
				'fail_subdomain_wpcom',
1380
				sprintf(
1381
					/* translators: %1$s is a domain name. */
1382
					__(
1383
						'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.',
1384
						'jetpack'
1385
					),
1386
					$domain
1387
				)
1388
			);
1389
		}
1390
1391
		// If PHP was compiled without support for the Filter module (very edge case).
1392
		if ( ! function_exists( 'filter_var' ) ) {