@@ -193,26 +193,35 @@ public function __construct($fg = '', $bg = '', array $options = [], bool $extra
193193 {
194194 if ($ fg ) {
195195 if (!isset (self ::KNOWN_COLORS [$ fg ])) {
196- throw new InvalidArgumentException (sprintf ('Invalid foreground color "%1$s" [%2$s] ' , $ fg ,
197- implode (', ' , self ::getKnownColors ())));
196+ throw new InvalidArgumentException (sprintf (
197+ 'Invalid foreground color "%1$s" [%2$s] ' ,
198+ $ fg ,
199+ implode (', ' , self ::getKnownColors ())
200+ ));
198201 }
199202
200203 $ this ->fgColor = ($ extra ? self ::FG_EXTRA : self ::FG_BASE ) + self ::KNOWN_COLORS [$ fg ];
201204 }
202205
203206 if ($ bg ) {
204207 if (!isset (self ::KNOWN_COLORS [$ bg ])) {
205- throw new InvalidArgumentException (sprintf ('Invalid background color "%1$s" [%2$s] ' , $ bg ,
206- implode (', ' , self ::getKnownColors ())));
208+ throw new InvalidArgumentException (sprintf (
209+ 'Invalid background color "%1$s" [%2$s] ' ,
210+ $ bg ,
211+ implode (', ' , self ::getKnownColors ())
212+ ));
207213 }
208214
209215 $ this ->bgColor = ($ extra ? self ::BG_EXTRA : self ::BG_BASE ) + self ::KNOWN_COLORS [$ bg ];
210216 }
211217
212218 foreach ($ options as $ option ) {
213219 if (!isset (self ::KNOWN_OPTIONS [$ option ])) {
214- throw new InvalidArgumentException (sprintf ('Invalid option "%1$s" [%2$s] ' , $ option ,
215- implode (', ' , self ::getKnownOptions ())));
220+ throw new InvalidArgumentException (sprintf (
221+ 'Invalid option "%1$s" [%2$s] ' ,
222+ $ option ,
223+ implode (', ' , self ::getKnownOptions ())
224+ ));
216225 }
217226
218227 $ this ->options [] = $ option ;
0 commit comments