Code Duplication    Length = 13-13 lines in 2 locations

packages/connection/src/Manager.php 2 locations

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