File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -192,8 +192,9 @@ public static function style(string $name, array $style): void
192
192
throw new InvalidArgumentException ('Trying to set empty or invalid style ' );
193
193
}
194
194
195
- if (method_exists (static ::class, $ name ) && isset ($ style ['bg ' ]) && isset ($ style ['fg ' ]) && $ style ['bg ' ] === $ style ['fg ' ]) {
196
- throw new InvalidArgumentException ('Built-in styles cannot be invisible (matching background and foreground) ' );
195
+ $ invisible = (isset ($ style ['bg ' ]) && isset ($ style ['fg ' ]) && $ style ['bg ' ] === $ style ['fg ' ]);
196
+ if ($ invisible && method_exists (static ::class, $ name )) {
197
+ throw new InvalidArgumentException ('Built-in styles cannot be invisible ' );
197
198
}
198
199
199
200
static ::$ styles [$ name ] = $ style ;
You can’t perform that action at this time.
0 commit comments