Code Duplication    Length = 3-3 lines in 2 locations

class.jetpack-cli.php 2 locations

@@ 248-250 (lines=3) @@
245
	 */
246
	public function reset( $args, $assoc_args ) {
247
		$action = isset( $args[0] ) ? $args[0] : 'prompt';
248
		if ( ! in_array( $action, array( 'options', 'modules' ) ) ) {
249
			/* translators: %s is a command like "prompt" */
250
			WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) );
251
		}
252
253
		// Are you sure?
@@ 571-573 (lines=3) @@
568
		// Is the option flagged as unsafe?
569
		$flagged = ! in_array( $args[1], $safe_to_modify );
570
571
		if ( ! in_array( $action, array( 'list', 'get', 'delete', 'update' ) ) ) {
572
			/* translators: %s is a command like "prompt" */
573
			WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) );
574
		}
575
576
		if ( isset( $args[0] ) ) {