Code Duplication    Length = 8-11 lines in 2 locations

class.jetpack-cli.php 2 locations

@@ 398-405 (lines=8) @@
395
				 * Done here because it's easier to read the $whitelist array after it's been rebuilt
396
				 */
397
				if ( isset( $args[1] ) && 'list' == $args[1] ) {
398
					if ( ! empty( $whitelist ) ) {
399
						WP_CLI::success( __( 'Here are your whitelisted IPs:', 'jetpack' ) );
400
						foreach ( $whitelist as $ip ) {
401
							WP_CLI::line( "\t" . str_pad( $ip, 24 ) ) ;
402
						}
403
					} else {
404
						WP_CLI::line( __( 'Whitelist is empty.', "jetpack" ) ) ;
405
					}
406
					break;
407
				}
408
@@ 649-659 (lines=11) @@
646
					} else {
647
						WP_CLI::log( __( 'Initialized a new full sync', 'jetpack' ) );
648
					}
649
				} else {
650
651
					// Reset sync settings to original.
652
					Jetpack_Sync_Settings::update_settings( $original_settings );
653
654
					if ( $modules ) {
655
						WP_CLI::error( sprintf( __( 'Could not start a new full sync with modules: %s', 'jetpack' ), join( ', ', $modules ) ) );
656
					} else {
657
						WP_CLI::error( __( 'Could not start a new full sync', 'jetpack' ) );
658
					}
659
				}
660
661
				// Keep sending to WPCOM until there's nothing to send
662
				$i = 1;