1212
1313use Longman \TelegramBot \Commands \AdminCommand ;
1414use Longman \TelegramBot \DB ;
15+ use Longman \TelegramBot \Exception \TelegramException ;
1516use Longman \TelegramBot \Request ;
1617
1718/**
@@ -43,14 +44,14 @@ class DebugCommand extends AdminCommand
4344 * Command execute method
4445 *
4546 * @return mixed
46- * @throws \Longman\TelegramBot\Exception\ TelegramException
47+ * @throws TelegramException
4748 */
4849 public function execute ()
4950 {
50- $ pdo = DB ::getPdo ();
51+ $ pdo = DB ::getPdo ();
5152 $ message = $ this ->getMessage ();
52- $ chat = $ message ->getChat ();
53- $ text = strtolower ($ message ->getText (true ));
53+ $ chat = $ message ->getChat ();
54+ $ text = strtolower ($ message ->getText (true ));
5455
5556 $ data = ['chat_id ' => $ chat ->getId ()];
5657
@@ -80,15 +81,15 @@ public function execute()
8081 $ debug_info [] = sprintf ('*Maximum PHP script execution time:* `%d seconds` ' , ini_get ('max_execution_time ' ));
8182
8283 $ mysql_version = $ pdo ? $ pdo ->query ('SELECT VERSION() AS version ' )->fetchColumn () : null ;
83- $ debug_info [] = sprintf ('*MySQL version:* `%s` ' , $ mysql_version ?: 'disabled ' );
84+ $ debug_info [] = sprintf ('*MySQL version:* `%s` ' , $ mysql_version ?: 'disabled ' );
8485
8586 $ debug_info [] = sprintf ('*Operating System:* `%s` ' , php_uname ());
8687
8788 if (isset ($ _SERVER ['SERVER_SOFTWARE ' ])) {
8889 $ debug_info [] = sprintf ('*Web Server:* `%s` ' , $ _SERVER ['SERVER_SOFTWARE ' ]);
8990 }
9091 if (function_exists ('curl_init ' )) {
91- $ curlversion = curl_version ();
92+ $ curlversion = curl_version ();
9293 $ debug_info [] = sprintf ('*curl version:* `%1$s; %2$s` ' , $ curlversion ['version ' ], $ curlversion ['ssl_version ' ]);
9394 }
9495
@@ -105,8 +106,8 @@ public function execute()
105106 }
106107
107108 $ webhook_info_result_str = json_encode ($ webhook_info_result , JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES );
108- $ debug_info [] = $ webhook_info_title ;
109- $ debug_info [] = sprintf (
109+ $ debug_info [] = $ webhook_info_title ;
110+ $ debug_info [] = sprintf (
110111 '``` ' . PHP_EOL . '%s``` ' ,
111112 $ webhook_info_result_str
112113 );
@@ -116,7 +117,7 @@ public function execute()
116117 }
117118
118119 $ data ['parse_mode ' ] = 'Markdown ' ;
119- $ data ['text ' ] = implode (PHP_EOL , $ debug_info );
120+ $ data ['text ' ] = implode (PHP_EOL , $ debug_info );
120121
121122 return Request::sendMessage ($ data );
122123 }
0 commit comments