Passed
Push — master ( f853f9...6a6913 )
by Shahrad
02:10
created
src/lib/Telegram.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@
 block discarded – undo
191 191
             );
192 192
         }
193 193
 
194
-        if (!self::validateToken($apiKey)){
194
+        if (!self::validateToken($apiKey)) {
195 195
             throw new TelegramException(
196 196
                 'Invalid token! Please check your code and try again.'
197 197
             );
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -258,7 +258,9 @@  discard block
 block discarded – undo
258 258
     public static function getUpdate(): Update|false
259 259
     {
260 260
         $input = self::getInput();
261
-        if (empty($input)) return false;
261
+        if (empty($input)) {
262
+            return false;
263
+        }
262 264
         return Telegram::processUpdate($input, self::getApiKey());
263 265
     }
264 266
 
@@ -284,7 +286,9 @@  discard block
 block discarded – undo
284 286
     public function fetchWith(WebhookHandler $webhook_handler, ?Update $update = null): void
285 287
     {
286 288
         if (is_subclass_of($webhook_handler, WebhookHandler::class)) {
287
-            if ($update === null) $update = self::getUpdate();
289
+            if ($update === null) {
290
+                $update = self::getUpdate();
291
+            }
288 292
             $webhook_handler->resolve($update);
289 293
         }
290 294
     }
@@ -297,7 +301,9 @@  discard block
 block discarded – undo
297 301
      */
298 302
     protected function getTokenFromEnvFile(string $file): ?string
299 303
     {
300
-        if (!file_exists($file)) return null;
304
+        if (!file_exists($file)) {
305
+            return null;
306
+        }
301 307
         return DotEnv::load($file)::get('TELEGRAM_API_KEY');
302 308
     }
303 309
 
Please login to merge, or discard this patch.