@@ -243,7 +243,9 @@ discard block |
||
243 | 243 | public static function getUpdate(): Update|false |
244 | 244 | { |
245 | 245 | $input = self::getInput(); |
246 | - if ($input === '' || Common::isJson($input) === false) return false; |
|
246 | + if ($input === '' || Common::isJson($input) === false) { |
|
247 | + return false; |
|
248 | + } |
|
247 | 249 | return Telegram::processUpdate($input); |
248 | 250 | } |
249 | 251 | |
@@ -269,7 +271,9 @@ discard block |
||
269 | 271 | public function fetchWith(WebhookHandler $webhook_handler, ?Update $update = null): void |
270 | 272 | { |
271 | 273 | if (is_subclass_of($webhook_handler, WebhookHandler::class)) { |
272 | - if ($update === null) $update = self::getUpdate(); |
|
274 | + if ($update === null) { |
|
275 | + $update = self::getUpdate(); |
|
276 | + } |
|
273 | 277 | $webhook_handler->resolve($update); |
274 | 278 | } |
275 | 279 | } |
@@ -282,7 +286,9 @@ discard block |
||
282 | 286 | */ |
283 | 287 | protected function getTokenFromEnvFile(string $file): ?string |
284 | 288 | { |
285 | - if (!file_exists($file)) return null; |
|
289 | + if (!file_exists($file)) { |
|
290 | + return null; |
|
291 | + } |
|
286 | 292 | return DotEnv::load($file)::get('TELEGRAM_API_KEY'); |
287 | 293 | } |
288 | 294 |