Code Duplication    Length = 13-13 lines in 2 locations

packages/connection/src/Manager.php 2 locations

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