Switch to direct type declarations of class properties.
This commit is contained in:
@@ -12,44 +12,31 @@ class Debug {
|
||||
Debug::LOG_EXTENDED,
|
||||
];
|
||||
|
||||
// TODO: class properties can be switched to PHP typing if/when the minimum PHP_VERSION is raised to 7.4.0+
|
||||
/**
|
||||
* @deprecated
|
||||
* @var int
|
||||
*/
|
||||
public static $LOG_DISABLED = self::LOG_DISABLED;
|
||||
public static int $LOG_DISABLED = self::LOG_DISABLED;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @var int
|
||||
*/
|
||||
public static $LOG_NORMAL = self::LOG_NORMAL;
|
||||
public static int $LOG_NORMAL = self::LOG_NORMAL;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @var int
|
||||
*/
|
||||
public static $LOG_VERBOSE = self::LOG_VERBOSE;
|
||||
public static int $LOG_VERBOSE = self::LOG_VERBOSE;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @var int
|
||||
*/
|
||||
public static $LOG_EXTENDED = self::LOG_EXTENDED;
|
||||
public static int $LOG_EXTENDED = self::LOG_EXTENDED;
|
||||
|
||||
/** @var bool */
|
||||
private static $enabled = false;
|
||||
private static bool $enabled = false;
|
||||
private static bool $quiet = false;
|
||||
private static ?string $logfile = null;
|
||||
|
||||
/** @var bool */
|
||||
private static $quiet = false;
|
||||
|
||||
/** @var string|null */
|
||||
private static $logfile = null;
|
||||
|
||||
/**
|
||||
* @var int Debug::LOG_*
|
||||
*/
|
||||
private static $loglevel = self::LOG_NORMAL;
|
||||
private static int $loglevel = self::LOG_NORMAL;
|
||||
|
||||
public static function set_logfile(string $logfile): void {
|
||||
self::$logfile = $logfile;
|
||||
@@ -70,7 +57,7 @@ class Debug {
|
||||
/**
|
||||
* @param Debug::LOG_* $level
|
||||
*/
|
||||
public static function set_loglevel($level): void {
|
||||
public static function set_loglevel(int $level): void {
|
||||
self::$loglevel = $level;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user