Code Duplication    Length = 13-13 lines in 2 locations

packages/connection/src/Manager.php 2 locations

@@ 1342-1354 (lines=13) @@
1339
		}
1340
1341
		// No .test or .local domains.
1342
		if ( preg_match( '#\.(test|local)$#i', $domain ) ) {
1343
			return new \WP_Error(
1344
				'fail_domain_tld',
1345
				sprintf(
1346
					/* translators: %1$s is a domain name. */
1347
					__(
1348
						'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.',
1349
						'jetpack'
1350
					),
1351
					$domain
1352
				)
1353
			);
1354
		}
1355
1356
		// No WPCOM subdomains.
1357
		if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) {
@@ 1357-1369 (lines=13) @@
1354
		}
1355
1356
		// No WPCOM subdomains.
1357
		if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) {
1358
			return new \WP_Error(
1359
				'fail_subdomain_wpcom',
1360
				sprintf(
1361
					/* translators: %1$s is a domain name. */
1362
					__(
1363
						'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.',
1364
						'jetpack'
1365
					),
1366
					$domain
1367
				)
1368
			);
1369
		}
1370
1371
		// If PHP was compiled without support for the Filter module (very edge case).
1372
		if ( ! function_exists( 'filter_var' ) ) {