From 88c93787a5dcf52c78880abe06fa000d556af4cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 26 Mar 2021 14:03:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Snowflake.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/System/Snowflake.php b/System/Snowflake.php index 0a7ff1be..05a3950e 100644 --- a/System/Snowflake.php +++ b/System/Snowflake.php @@ -346,9 +346,7 @@ class Snowflake /** * @param $process - * @throws ComponentException - * @throws NotFindClassException - * @throws ReflectionException + * @throws Exception */ public static function shutdown($process): void { @@ -407,7 +405,7 @@ class Snowflake /** * @return string|null */ - public static function getEnvironmental(): ?string + #[Pure] public static function getEnvironmental(): ?string { return env('environmental'); } @@ -416,7 +414,7 @@ class Snowflake /** * @return bool */ - public static function isTask(): bool + #[Pure] public static function isTask(): bool { return static::getEnvironmental() == static::TASK; } @@ -425,7 +423,7 @@ class Snowflake /** * @return bool */ - public static function isWorker(): bool + #[Pure] public static function isWorker(): bool { return static::getEnvironmental() == static::WORKER; } @@ -434,7 +432,7 @@ class Snowflake /** * @return bool */ - public static function isProcess(): bool + #[Pure] public static function isProcess(): bool { return static::getEnvironmental() == static::PROCESS; }