File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -307,7 +307,7 @@ public function getDisabledItemText(string $text) : string
307
307
*/
308
308
private function getForegroundColourCode (bool $ bright = false ) : string
309
309
{
310
- if (!ctype_digit ($ this ->fg )) {
310
+ if (!is_numeric ($ this ->fg )) {
311
311
$ fgCode = (int )self ::$ availableForegroundColors [$ this ->fg ];
312
312
$ fgCode += ($ bright ? 60 : 0 );
313
313
} else {
@@ -326,7 +326,7 @@ private function getForegroundColourCode(bool $bright = false) : string
326
326
*/
327
327
private function getBackgroundColourCode (bool $ bright = false ) : string
328
328
{
329
- if (!ctype_digit ($ this ->bg )) {
329
+ if (!is_numeric ($ this ->bg )) {
330
330
$ bgCode = (int )self ::$ availableBackgroundColors [$ this ->bg ];
331
331
$ bgCode += ($ bright ? 60 : 0 );
332
332
} else {
@@ -809,7 +809,7 @@ public function getBorderColour() : string
809
809
810
810
public function getBorderColourCode () : string
811
811
{
812
- if (!ctype_digit ($ this ->borderColour )) {
812
+ if (!is_numeric ($ this ->borderColour )) {
813
813
$ borderColourCode = self ::$ availableBackgroundColors [$ this ->borderColour ];
814
814
} else {
815
815
$ borderColourCode = sprintf ("48;5;%s " , $ this ->borderColour );
Original file line number Diff line number Diff line change @@ -309,7 +309,7 @@ public static function map256To8(int $colourCode) : string
309
309
*/
310
310
public static function validateColour (Terminal $ terminal , string $ colour , string $ fallback = null ) : string
311
311
{
312
- if (!ctype_digit ($ colour )) {
312
+ if (!is_numeric ($ colour )) {
313
313
return self ::validateColourName ($ colour );
314
314
}
315
315
You can’t perform that action at this time.
0 commit comments