Code Duplication    Length = 4-8 lines in 2 locations

class.jetpack-network.php 2 locations

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