Skip to content

Commit 9b25944

Browse files
Merge branch '3.4' into 4.1
* 3.4: [DI] configure inlined services before injecting them when dumping the container Consistently throw exceptions on a single line fix fopen calls Update .editorconfig
2 parents 01f4a0c + 7f398cf commit 9b25944

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

Formatter/OutputFormatterStyle.php

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,7 @@ public function setForeground($color = null)
9090
}
9191

9292
if (!isset(static::$availableForegroundColors[$color])) {
93-
throw new InvalidArgumentException(sprintf(
94-
'Invalid foreground color specified: "%s". Expected one of (%s)',
95-
$color,
96-
implode(', ', array_keys(static::$availableForegroundColors))
97-
));
93+
throw new InvalidArgumentException(sprintf('Invalid foreground color specified: "%s". Expected one of (%s)', $color, implode(', ', array_keys(static::$availableForegroundColors))));
9894
}
9995

10096
$this->foreground = static::$availableForegroundColors[$color];
@@ -116,11 +112,7 @@ public function setBackground($color = null)
116112
}
117113

118114
if (!isset(static::$availableBackgroundColors[$color])) {
119-
throw new InvalidArgumentException(sprintf(
120-
'Invalid background color specified: "%s". Expected one of (%s)',
121-
$color,
122-
implode(', ', array_keys(static::$availableBackgroundColors))
123-
));
115+
throw new InvalidArgumentException(sprintf('Invalid background color specified: "%s". Expected one of (%s)', $color, implode(', ', array_keys(static::$availableBackgroundColors))));
124116
}
125117

126118
$this->background = static::$availableBackgroundColors[$color];
@@ -136,11 +128,7 @@ public function setBackground($color = null)
136128
public function setOption($option)
137129
{
138130
if (!isset(static::$availableOptions[$option])) {
139-
throw new InvalidArgumentException(sprintf(
140-
'Invalid option specified: "%s". Expected one of (%s)',
141-
$option,
142-
implode(', ', array_keys(static::$availableOptions))
143-
));
131+
throw new InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s)', $option, implode(', ', array_keys(static::$availableOptions))));
144132
}
145133

146134
if (!\in_array(static::$availableOptions[$option], $this->options)) {
@@ -158,11 +146,7 @@ public function setOption($option)
158146
public function unsetOption($option)
159147
{
160148
if (!isset(static::$availableOptions[$option])) {
161-
throw new InvalidArgumentException(sprintf(
162-
'Invalid option specified: "%s". Expected one of (%s)',
163-
$option,
164-
implode(', ', array_keys(static::$availableOptions))
165-
));
149+
throw new InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s)', $option, implode(', ', array_keys(static::$availableOptions))));
166150
}
167151

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

0 commit comments

Comments
 (0)