Skip to content

Commit 569ffc8

Browse files
Copilotswissspidy
andcommitted
Simplify format handling by removing unnecessary empty check
Since WP-CLI validates format parameter values, there's no need to check for empty values and set a default. The format value will always be valid when isset() returns true. Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent 05894a3 commit 569ffc8

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

‎src/Core_Language_Command.php‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,6 @@ public function install( $args, $assoc_args ) {
283283
}
284284

285285
if ( $has_format_flag ) {
286-
if ( empty( $assoc_args['format'] ) ) {
287-
$assoc_args['format'] = 'table';
288-
}
289-
290286
if ( 'summary' !== $assoc_args['format'] ) {
291287
\WP_CLI\Utils\format_items( $assoc_args['format'], $results, array( 'locale', 'status' ) );
292288
}

0 commit comments

Comments
 (0)