Using ${var} in strings is deprecated, use {$var} instead

This commit is contained in:
2023-04-13 14:12:28 +02:00
parent 03c5c78ed7
commit b6a849627c
3 changed files with 7 additions and 7 deletions

View File

@@ -350,7 +350,7 @@ class Console
}
foreach ($completeArr as $key => $val) {
if ($isAssoc) {
printf("%-${maxlen}s %s\n", $key, $val);
printf("%-{$maxlen}s %s\n", $key, $val);
} elseif (trim($val) === "") {
// TODO : Define the string to display for ending string
echo "<br>\n";
@@ -822,7 +822,7 @@ class Console
$this->consoleException("ColorNum provided to colorText is not an " .
"integer");
}
echo "\033[38;5;${colorNum}m";
echo "\033[38;5;{$colorNum}m";
}
/** Set the background text color
@@ -834,7 +834,7 @@ class Console
$this->consoleException("ColorNum provided to colorBackgroundText not " .
"an integer");
}
echo "\033[48;5;${colorNum}m";
echo "\033[48;5;{$colorNum}m";
}
/** Reset the colors
@@ -854,7 +854,7 @@ class Console
} else {
$underline = "";
}
echo "\033[${underline}4m";
echo "\033[{$underline}4m";
}
/** Bold the text
@@ -867,7 +867,7 @@ class Console
} else {
$bold = 1;
}
echo "\033[${bold}m";
echo "\033[{$bold}m";
}
/** Return true if the TTY is enabled, or false if the program is called from pipe