Code Duplication    Length = 3-4 lines in 2 locations

class.jetpack-cli.php 2 locations

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