Skip to content
Browse files

[Console] Misuse of str_pad instead of str_repeat

  • Loading branch information...
1 parent c8dc687 commit 66407046eaee09695c67e694696b7732a69e946b @nanocom nanocom committed Sep 15, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 Input/InputDefinition.php
View
4 Input/InputDefinition.php
@@ -433,7 +433,7 @@ public function asText()
$default = '';
}
- $description = str_replace("\n", "\n".str_pad('', $max + 2, ' '), $argument->getDescription());
+ $description = str_replace("\n", "\n".str_repeat(' ', $max + 2), $argument->getDescription());
$text[] = sprintf(" <info>%-${max}s</info> %s%s", $argument->getName(), $description, $default);
}
@@ -452,7 +452,7 @@ public function asText()
}
$multiple = $option->isArray() ? '<comment> (multiple values allowed)</comment>' : '';
- $description = str_replace("\n", "\n".str_pad('', $max + 2, ' '), $option->getDescription());
+ $description = str_replace("\n", "\n".str_repeat(' ', $max + 2), $option->getDescription());
$optionMax = $max - strlen($option->getName()) - 2;
$text[] = sprintf(" <info>%s</info> %-${optionMax}s%s%s%s",

0 comments on commit 6640704

Please sign in to comment.
Something went wrong with that request. Please try again.