Code Duplication    Length = 8-11 lines in 2 locations

class.jetpack-cli.php 2 locations

@@ 462-469 (lines=8) @@
459
				 * Done here because it's easier to read the $whitelist array after it's been rebuilt
460
				 */
461
				if ( isset( $args[1] ) && 'list' == $args[1] ) {
462
					if ( ! empty( $whitelist ) ) {
463
						WP_CLI::success( __( 'Here are your whitelisted IPs:', 'jetpack' ) );
464
						foreach ( $whitelist as $ip ) {
465
							WP_CLI::line( "\t" . str_pad( $ip, 24 ) ) ;
466
						}
467
					} else {
468
						WP_CLI::line( __( 'Whitelist is empty.', "jetpack" ) ) ;
469
					}
470
					break;
471
				}
472
@@ 715-725 (lines=11) @@
712
					} else {
713
						WP_CLI::log( __( 'Initialized a new full sync', 'jetpack' ) );
714
					}
715
				} else {
716
717
					// Reset sync settings to original.
718
					Jetpack_Sync_Settings::update_settings( $original_settings );
719
720
					if ( $modules ) {
721
						WP_CLI::error( sprintf( __( 'Could not start a new full sync with modules: %s', 'jetpack' ), join( ', ', $modules ) ) );
722
					} else {
723
						WP_CLI::error( __( 'Could not start a new full sync', 'jetpack' ) );
724
					}
725
				}
726
727
				// Keep sending to WPCOM until there's nothing to send
728
				$i = 1;