Code Duplication    Length = 13-13 lines in 2 locations

packages/connection/src/Manager.php 2 locations

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