@@ -90,11 +90,7 @@ public function setForeground($color = null)
90
90
}
91
91
92
92
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 ))));
98
94
}
99
95
100
96
$ this ->foreground = static ::$ availableForegroundColors [$ color ];
@@ -116,11 +112,7 @@ public function setBackground($color = null)
116
112
}
117
113
118
114
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 ))));
124
116
}
125
117
126
118
$ this ->background = static ::$ availableBackgroundColors [$ color ];
@@ -136,11 +128,7 @@ public function setBackground($color = null)
136
128
public function setOption ($ option )
137
129
{
138
130
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 ))));
144
132
}
145
133
146
134
if (!\in_array (static ::$ availableOptions [$ option ], $ this ->options )) {
@@ -158,11 +146,7 @@ public function setOption($option)
158
146
public function unsetOption ($ option )
159
147
{
160
148
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 ))));
166
150
}
167
151
168
152
$ pos = array_search (static ::$ availableOptions [$ option ], $ this ->options );
0 commit comments