Code Duplication    Length = 4-8 lines in 2 locations

class.jetpack-network.php 2 locations

@@ 345-352 (lines=8) @@
342
					Jetpack::log( 'subsiteregister' );
343
344
					// If !$_GET['site_id'] stop registration and error.
345
					if ( ! isset( $_GET['site_id'] ) || empty( $_GET['site_id'] ) ) {
346
						/**
347
						 * Log error to state cookie for display later.
348
						 *
349
						 * @todo Make state messages show on Jetpack NA pages
350
						 */
351
						Jetpack::state( 'missing_site_id', esc_html__( 'Site ID must be provided to register a sub-site.', 'jetpack' ) );
352
						break;
353
					}
354
355
					// Send data to register endpoint and retrieve shadow blog details.
@@ 371-374 (lines=4) @@
368
				case 'subsitedisconnect':
369
					Jetpack::log( 'subsitedisconnect' );
370
371
					if ( ! isset( $_GET['site_id'] ) || empty( $_GET['site_id'] ) ) {
372
						Jetpack::state( 'missing_site_id', esc_html__( 'Site ID must be provided to disconnect a sub-site.', 'jetpack' ) );
373
						break;
374
					}
375
376
					$this->do_subsitedisconnect();
377
					break;