Skip to content

Commit 9dc177d

Browse files
committed
Add missing dots at the end of exception messages
1 parent 6827023 commit 9dc177d

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

Application.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ public function findNamespace($namespace)
576576

577577
$exact = \in_array($namespace, $namespaces, true);
578578
if (\count($namespaces) > 1 && !$exact) {
579-
throw new CommandNotFoundException(sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s", $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces));
579+
throw new CommandNotFoundException(sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces));
580580
}
581581

582582
return $exact ? $namespace : reset($namespaces);
@@ -681,7 +681,7 @@ public function find($name)
681681
}, array_values($commands));
682682
$suggestions = $this->getAbbreviationSuggestions(array_filter($abbrevs));
683683

684-
throw new CommandNotFoundException(sprintf("Command \"%s\" is ambiguous.\nDid you mean one of these?\n%s", $name, $suggestions), array_values($commands));
684+
throw new CommandNotFoundException(sprintf("Command \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $name, $suggestions), array_values($commands));
685685
}
686686

687687
return $this->get($exact ? $name : reset($commands));

Command/Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ public function getProcessedHelp()
563563
public function setAliases($aliases)
564564
{
565565
if (!\is_array($aliases) && !$aliases instanceof \Traversable) {
566-
throw new InvalidArgumentException('$aliases must be an array or an instance of \Traversable');
566+
throw new InvalidArgumentException('$aliases must be an array or an instance of \Traversable.');
567567
}
568568

569569
foreach ($aliases as $alias) {

Formatter/OutputFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function hasStyle($name)
119119
public function getStyle($name)
120120
{
121121
if (!$this->hasStyle($name)) {
122-
throw new InvalidArgumentException(sprintf('Undefined style: %s', $name));
122+
throw new InvalidArgumentException(sprintf('Undefined style: %s.', $name));
123123
}
124124

125125
return $this->styles[strtolower($name)];

Formatter/OutputFormatterStyle.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function setForeground($color = null)
8686
}
8787

8888
if (!isset(static::$availableForegroundColors[$color])) {
89-
throw new InvalidArgumentException(sprintf('Invalid foreground color specified: "%s". Expected one of (%s)', $color, implode(', ', array_keys(static::$availableForegroundColors))));
89+
throw new InvalidArgumentException(sprintf('Invalid foreground color specified: "%s". Expected one of (%s).', $color, implode(', ', array_keys(static::$availableForegroundColors))));
9090
}
9191

9292
$this->foreground = static::$availableForegroundColors[$color];
@@ -104,7 +104,7 @@ public function setBackground($color = null)
104104
}
105105

106106
if (!isset(static::$availableBackgroundColors[$color])) {
107-
throw new InvalidArgumentException(sprintf('Invalid background color specified: "%s". Expected one of (%s)', $color, implode(', ', array_keys(static::$availableBackgroundColors))));
107+
throw new InvalidArgumentException(sprintf('Invalid background color specified: "%s". Expected one of (%s).', $color, implode(', ', array_keys(static::$availableBackgroundColors))));
108108
}
109109

110110
$this->background = static::$availableBackgroundColors[$color];
@@ -116,7 +116,7 @@ public function setBackground($color = null)
116116
public function setOption($option)
117117
{
118118
if (!isset(static::$availableOptions[$option])) {
119-
throw new InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s)', $option, implode(', ', array_keys(static::$availableOptions))));
119+
throw new InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s).', $option, implode(', ', array_keys(static::$availableOptions))));
120120
}
121121

122122
if (!\in_array(static::$availableOptions[$option], $this->options)) {
@@ -130,7 +130,7 @@ public function setOption($option)
130130
public function unsetOption($option)
131131
{
132132
if (!isset(static::$availableOptions[$option])) {
133-
throw new InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s)', $option, implode(', ', array_keys(static::$availableOptions))));
133+
throw new InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s).', $option, implode(', ', array_keys(static::$availableOptions))));
134134
}
135135

136136
$pos = array_search(static::$availableOptions[$option], $this->options);

Helper/TableStyle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class TableStyle
4242
public function setPaddingChar($paddingChar)
4343
{
4444
if (!$paddingChar) {
45-
throw new LogicException('The padding char must not be empty');
45+
throw new LogicException('The padding char must not be empty.');
4646
}
4747

4848
$this->paddingChar = $paddingChar;

Input/StringInput.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private function tokenize($input)
6161
$tokens[] = stripcslashes($match[1]);
6262
} else {
6363
// should never happen
64-
throw new InvalidArgumentException(sprintf('Unable to parse input near "... %s ..."', substr($input, $cursor, 10)));
64+
throw new InvalidArgumentException(sprintf('Unable to parse input near "... %s ...".', substr($input, $cursor, 10)));
6565
}
6666

6767
$cursor += \strlen($match[0]);

Tests/Formatter/OutputFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public function provideInlineStyleOptionsCases()
199199
/**
200200
* @group legacy
201201
* @dataProvider provideInlineStyleTagsWithUnknownOptions
202-
* @expectedDeprecation Unknown style options are deprecated since Symfony 3.2 and will be removed in 4.0. Exception "Invalid option specified: "%s". Expected one of (bold, underscore, blink, reverse, conceal)".
202+
* @expectedDeprecation Unknown style options are deprecated since Symfony 3.2 and will be removed in 4.0. Exception "Invalid option specified: "%s". Expected one of (bold, underscore, blink, reverse, conceal).".
203203
*/
204204
public function testInlineStyleOptionsUnknownAreDeprecated($tag, $option)
205205
{

0 commit comments

Comments
 (0)