Code Duplication    Length = 3-3 lines in 2 locations

class.jetpack-cli.php 2 locations

@@ 187-189 (lines=3) @@
184
	 */
185
	public function reset( $args, $assoc_args ) {
186
		$action = isset( $args[0] ) ? $args[0] : 'prompt';
187
		if ( ! in_array( $action, array( 'options', 'modules' ) ) ) {
188
			/* translators: %s is a command like "prompt" */
189
			WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) );
190
		}
191
192
		// Are you sure?
@@ 486-488 (lines=3) @@
483
		// Is the option flagged as unsafe?
484
		$flagged = ! in_array( $args[1], $safe_to_modify );
485
486
		if ( ! in_array( $action, array( 'list', 'get', 'delete', 'update' ) ) ) {
487
			/* translators: %s is a command like "prompt" */
488
			WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) );
489
		}
490
491
		if ( isset( $args[0] ) ) {