mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-26 22:14:39 +01:00
Apply fixes from StyleCI
This commit is contained in:
parent
08a3a00c13
commit
30e87023d9
14
bot.php
14
bot.php
@ -15,14 +15,14 @@ require 'vendor/autoload.php';
|
|||||||
$settings = [];
|
$settings = [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$MadelineProto = \danog\MadelineProto\Serialization::deserialize('bot.madeline');
|
$MadelineProto = \danog\MadelineProto\Serialization::deserialize('bot.madeline');
|
||||||
} catch (\danog\MadelineProto\Exception $e) {
|
} catch (\danog\MadelineProto\Exception $e) {
|
||||||
if (file_exists('token.php')) {
|
if (file_exists('token.php')) {
|
||||||
include_once 'token.php';
|
include_once 'token.php';
|
||||||
$MadelineProto = new \danog\MadelineProto\API($settings);
|
$MadelineProto = new \danog\MadelineProto\API($settings);
|
||||||
$authorization = $MadelineProto->bot_login($token);
|
$authorization = $MadelineProto->bot_login($token);
|
||||||
\danog\MadelineProto\Logger::log([$authorization], \danog\MadelineProto\Logger::NOTICE);
|
\danog\MadelineProto\Logger::log([$authorization], \danog\MadelineProto\Logger::NOTICE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -51,7 +51,12 @@ class API extends APIFactory
|
|||||||
|
|
||||||
return ['API', 'v'];
|
return ['API', 'v'];
|
||||||
}
|
}
|
||||||
public function getV() { return 1; }
|
|
||||||
|
public function getV()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
public function __wakeup()
|
public function __wakeup()
|
||||||
{
|
{
|
||||||
set_error_handler(['\danog\MadelineProto\Exception', 'ExceptionErrorHandler']);
|
set_error_handler(['\danog\MadelineProto\Exception', 'ExceptionErrorHandler']);
|
||||||
|
Loading…
Reference in New Issue
Block a user