Skip to content

Commit

Permalink
Re-fix of missing option description handling in help formatter (#5250)
Browse files Browse the repository at this point in the history
  • Loading branch information
weitzman committed Sep 23, 2022
1 parent aacce1a commit 4203a0a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Commands/help/HelpCLIFormatter.php
Expand Up @@ -139,15 +139,15 @@ protected function cleanOptions(&$data): void

if (array_key_exists('options', $data)) {
foreach ($data['options'] as $key => $option) {
// Populate any missing description.
if (!array_key_exists('description', $option)) {
$data['options'][$key]['description'] = '';
}

// Remove global options.
if (self::isGlobalOption($key)) {
unset($data['options'][$key]);
}

// Populate missing props.
if ($key == 'desciption' && !isset($option[$key])) {
$option[$key] = '';
}
}
}
}
Expand Down

0 comments on commit 4203a0a

Please sign in to comment.