Add return type to getTelegram - really need to do this everywhere
authorCameron Ball <cameron@cameron1729.xyz>
Sun, 2 Dec 2018 14:22:58 +0000 (22:22 +0800)
committerCameron Ball <cameron@cameron1729.xyz>
Sun, 2 Dec 2018 14:22:58 +0000 (22:22 +0800)
common.php

index e5424ae..e560659 100644 (file)
@@ -5,7 +5,7 @@ require_once(__DIR__ . '/config.php');
 
 use Telegram\Bot\Api;
 
-function getTelegram() {
+function getTelegram(): \Telegram\Bot\Api {
     STATIC $tg;
     return $tg = $tg ?? new \Telegram\Bot\Api(BOT_TOKEN);
 }