Code Duplication    Length = 13-13 lines in 2 locations

packages/connection/src/Manager.php 2 locations

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