Code Duplication    Length = 3-4 lines in 2 locations

class.jetpack-cli.php 2 locations

@@ 265-268 (lines=4) @@
262
	 */
263
	public function reset( $args, $assoc_args ) {
264
		$action = isset( $args[0] ) ? $args[0] : 'prompt';
265
		if ( ! in_array( $action, array( 'options', 'modules', 'sync-checksum' ), true ) ) {
266
			/* translators: %s is a command like "prompt" */
267
			WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) );
268
		}
269
270
		$is_dry_run = ! empty( $assoc_args['dry-run'] );
271
@@ 708-710 (lines=3) @@
705
		// Is the option flagged as unsafe?
706
		$flagged = ! in_array( $args[1], $safe_to_modify );
707
708
		if ( ! in_array( $action, array( 'list', 'get', 'delete', 'update' ) ) ) {
709
			/* translators: %s is a command like "prompt" */
710
			WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) );
711
		}
712
713
		if ( isset( $args[0] ) ) {