@@ -104,7 +104,7 @@ |
||
104 | 104 | Telegram::setAdminId($admin_id); |
105 | 105 | } |
106 | 106 | |
107 | - set_exception_handler(function (\Throwable $throwable) { |
|
107 | + set_exception_handler(function(\Throwable $throwable) { |
|
108 | 108 | if (!defined('DEBUG_MODE') && !DEBUG_MODE) { |
109 | 109 | throw new \RuntimeException( |
110 | 110 | $throwable->getMessage(), |
@@ -104,7 +104,9 @@ discard block |
||
104 | 104 | public function fetchWith(UpdateHandler $update_handler, Update|null $update = null): void |
105 | 105 | { |
106 | 106 | if (is_subclass_of($update_handler, UpdateHandler::class)) { |
107 | - if ($update === null) $update = self::getUpdate(); |
|
107 | + if ($update === null) { |
|
108 | + $update = self::getUpdate(); |
|
109 | + } |
|
108 | 110 | $update_handler->resolve($update); |
109 | 111 | } |
110 | 112 | } |
@@ -117,7 +119,9 @@ discard block |
||
117 | 119 | public static function getUpdate(): Update|false |
118 | 120 | { |
119 | 121 | $input = self::getInput(); |
120 | - if (empty($input)) return false; |
|
122 | + if (empty($input)) { |
|
123 | + return false; |
|
124 | + } |
|
121 | 125 | return Telegram::processUpdate($input, self::getApiToken()); |
122 | 126 | } |
123 | 127 |
@@ -50,7 +50,9 @@ |
||
50 | 50 | */ |
51 | 51 | protected function getEnvToken(string $file): string|null |
52 | 52 | { |
53 | - if (!file_exists($file)) return null; |
|
53 | + if (!file_exists($file)) { |
|
54 | + return null; |
|
55 | + } |
|
54 | 56 | return $_ENV['TELEGRAM_BOT_TOKEN'] ?? null; |
55 | 57 | } |
56 | 58 |