Code Duplication    Length = 3-4 lines in 2 locations

class.jetpack-cli.php 2 locations

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