Code Duplication    Length = 3-4 lines in 2 locations

class.jetpack-cli.php 2 locations

@@ 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] ) ) {
@@ 267-270 (lines=4) @@
264
	 */
265
	public function reset( $args, $assoc_args ) {
266
		$action = isset( $args[0] ) ? $args[0] : 'prompt';
267
		if ( ! in_array( $action, array( 'options', 'modules', 'sync-checksum' ), true ) ) {
268
			/* translators: %s is a command like "prompt" */
269
			WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) );
270
		}
271
272
		$is_dry_run = ! empty( $assoc_args['dry-run'] );
273