mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-17 12:44:51 +08:00
Fix phpstan
This commit is contained in:
parent
a39e96acd2
commit
1183766701
@ -25,7 +25,7 @@ trait CommandInteractTrait
|
||||
* @param string $message
|
||||
* @param mixed[] $context
|
||||
*/
|
||||
public function emergency($message, array $context = [])
|
||||
public function emergency($message, array $context = []): void
|
||||
{
|
||||
$this->log(LogLevel::EMERGENCY, $message, $context);
|
||||
}
|
||||
@ -39,7 +39,7 @@ trait CommandInteractTrait
|
||||
* @param string $message
|
||||
* @param mixed[] $context
|
||||
*/
|
||||
public function alert($message, array $context = [])
|
||||
public function alert($message, array $context = []): void
|
||||
{
|
||||
$this->log(LogLevel::ALERT, $message, $context);
|
||||
}
|
||||
@ -52,7 +52,7 @@ trait CommandInteractTrait
|
||||
* @param string $message
|
||||
* @param mixed[] $context
|
||||
*/
|
||||
public function critical($message, array $context = [])
|
||||
public function critical($message, array $context = []): void
|
||||
{
|
||||
$this->log(LogLevel::CRITICAL, $message, $context);
|
||||
}
|
||||
@ -64,7 +64,7 @@ trait CommandInteractTrait
|
||||
* @param string $message
|
||||
* @param mixed[] $context
|
||||
*/
|
||||
public function error($message, array $context = [])
|
||||
public function error($message, array $context = []): void
|
||||
{
|
||||
$this->log(LogLevel::ERROR, $message, $context);
|
||||
}
|
||||
@ -78,7 +78,7 @@ trait CommandInteractTrait
|
||||
* @param string $message
|
||||
* @param mixed[] $context
|
||||
*/
|
||||
public function warning($message, array $context = [])
|
||||
public function warning($message, array $context = []): void
|
||||
{
|
||||
$this->log(LogLevel::WARNING, $message, $context);
|
||||
}
|
||||
@ -89,7 +89,7 @@ trait CommandInteractTrait
|
||||
* @param string $message
|
||||
* @param mixed[] $context
|
||||
*/
|
||||
public function notice($message, array $context = [])
|
||||
public function notice($message, array $context = []): void
|
||||
{
|
||||
$this->log(LogLevel::NOTICE, $message, $context);
|
||||
}
|
||||
@ -101,7 +101,7 @@ trait CommandInteractTrait
|
||||
*
|
||||
* @param string $message
|
||||
*/
|
||||
public function info($message, array $context = [])
|
||||
public function info($message, array $context = []): void
|
||||
{
|
||||
$this->log(LogLevel::INFO, $message, $context);
|
||||
}
|
||||
@ -111,12 +111,12 @@ trait CommandInteractTrait
|
||||
*
|
||||
* @param string $message
|
||||
*/
|
||||
public function debug($message, array $context = [])
|
||||
public function debug($message, array $context = []): void
|
||||
{
|
||||
$this->log(LogLevel::DEBUG, $message, $context);
|
||||
}
|
||||
|
||||
public function log($level, $message, array $context = [])
|
||||
public function log($level, $message, array $context = []): void
|
||||
{
|
||||
$msg = match ($level) {
|
||||
'info' => "<info>{$message}</info>",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user