Code Duplication    Length = 4-8 lines in 2 locations

class.jetpack-network.php 2 locations

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