Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c9c3c01

Browse filesBrowse files
committed
Rebase
1 parent ccc7fe8 commit c9c3c01
Copy full SHA for c9c3c01

File tree

2 files changed

+4
-4
lines changed
Filter options

2 files changed

+4
-4
lines changed

‎src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ protected function describeCommand(Command $command, array $options = [])
125125
if ($options['short'] ?? false) {
126126
$this->write(
127127
'`'.$command->getName()."`\n"
128-
.str_repeat('-', Helper::strlen($command->getName()) + 2)."\n\n"
128+
.str_repeat('-', Helper::strwidth($command->getName()) + 2)."\n\n"
129129
.($command->getDescription() ? $command->getDescription()."\n\n" : '')
130130
.'### Usage'."\n\n"
131131
.array_reduce($command->getAliases(), function ($carry, $usage) {

‎src/Symfony/Component/Console/Descriptor/TextDescriptor.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Descriptor/TextDescriptor.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,11 @@ private function calculateTotalWidthForOptions(array $options): int
324324
$totalWidth = 0;
325325
foreach ($options as $option) {
326326
// "-" + shortcut + ", --" + name
327-
$nameLength = 1 + max(Helper::strlen($option->getShortcut()), 1) + 4 + Helper::strlen($option->getName());
327+
$nameLength = 1 + max(Helper::strwidth($option->getShortcut()), 1) + 4 + Helper::strlen($option->getName());
328328
if ($option->isNegatable()) {
329-
$nameLength += 6 + Helper::strlen($option->getName()); // |--no- + name
329+
$nameLength += 6 + Helper::strwidth($option->getName()); // |--no- + name
330330
} elseif ($option->acceptValue()) {
331-
$valueLength = 1 + Helper::strlen($option->getName()); // = + value
331+
$valueLength = 1 + Helper::strwidth($option->getName()); // = + value
332332
$valueLength += $option->isValueOptional() ? 2 : 0; // [ + ]
333333

334334
$nameLength += $valueLength;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.