@@ -158,8 +158,11 @@ final public function __construct()
158158 * @param string $logDirectory error log directory
159159 * @param string|array $email administrator email; enables email sending in production mode
160160 */
161- public static function enable ($ mode = null , ?string $ logDirectory = null , $ email = null ): void
162- {
161+ public static function enable (
162+ bool |string |array |null $ mode = null ,
163+ ?string $ logDirectory = null ,
164+ string |array |null $ email = null ,
165+ ): void {
163166 if ($ mode !== null || self ::$ productionMode === null ) {
164167 self ::$ productionMode = is_bool ($ mode )
165168 ? $ mode
@@ -422,8 +425,8 @@ public static function getLogger(): ILogger
422425 }
423426
424427
425- /** @return ProductionStrategy|DevelopmentStrategy @ internal */
426- public static function getStrategy ()
428+ /** @internal */
429+ public static function getStrategy (): ProductionStrategy | DevelopmentStrategy
427430 {
428431 if (empty (self ::$ strategy [self ::$ productionMode ])) {
429432 self ::$ strategy [self ::$ productionMode ] = self ::$ productionMode
@@ -471,7 +474,7 @@ public static function getSessionStorage(): SessionStorage
471474 * @param bool $return return output instead of printing it? (bypasses $productionMode)
472475 * @return mixed variable itself or dump
473476 */
474- public static function dump ($ var , bool $ return = false )
477+ public static function dump (mixed $ var , bool $ return = false ): mixed
475478 {
476479 if ($ return ) {
477480 $ options = [
@@ -518,10 +521,9 @@ public static function timer(?string $name = null): float
518521 /**
519522 * Dumps information about a variable in Tracy Debug Bar.
520523 * @tracySkipLocation
521- * @param mixed $var
522524 * @return mixed variable itself
523525 */
524- public static function barDump ($ var , ?string $ title = null , array $ options = [])
526+ public static function barDump (mixed $ var , ?string $ title = null , array $ options = []): mixed
525527 {
526528 if (!self ::$ productionMode ) {
527529 static $ panel ;
@@ -543,10 +545,8 @@ public static function barDump($var, ?string $title = null, array $options = [])
543545
544546 /**
545547 * Logs message or exception.
546- * @param mixed $message
547- * @return mixed
548548 */
549- public static function log ($ message , string $ level = ILogger::INFO )
549+ public static function log (mixed $ message , string $ level = ILogger::INFO ): mixed
550550 {
551551 return self ::getLogger ()->log ($ message , $ level );
552552 }
@@ -576,7 +576,7 @@ public static function mapSource(string $file, int $line): ?array
576576 * Detects debug mode by IP address.
577577 * @param string|array $list IP addresses or computer names whitelist detection
578578 */
579- public static function detectDebugMode ($ list = null ): bool
579+ public static function detectDebugMode (string | array | null $ list = null ): bool
580580 {
581581 $ addr = $ _SERVER ['REMOTE_ADDR ' ] ?? php_uname ('n ' );
582582 $ secret = isset ($ _COOKIE [self ::COOKIE_SECRET ]) && is_string ($ _COOKIE [self ::COOKIE_SECRET ])
0 commit comments