Apply fixes from StyleCI
This commit is contained in:
parent
ba740d7be7
commit
f15631ab86
|
@ -32,7 +32,6 @@ class API extends APIFactory
|
||||||
\danog\MadelineProto\Logger::log('Getting future salts...');
|
\danog\MadelineProto\Logger::log('Getting future salts...');
|
||||||
$this->future_salts = $this->get_future_salts([3]);
|
$this->future_salts = $this->get_future_salts([3]);
|
||||||
|
|
||||||
|
|
||||||
\danog\MadelineProto\Logger::log('MadelineProto is ready!');
|
\danog\MadelineProto\Logger::log('MadelineProto is ready!');
|
||||||
restore_error_handler();
|
restore_error_handler();
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,6 @@ class Connection extends Tools
|
||||||
public $authorization = null;
|
public $authorization = null;
|
||||||
public $waiting_code = false;
|
public $waiting_code = false;
|
||||||
|
|
||||||
|
|
||||||
public $incoming_messages = [];
|
public $incoming_messages = [];
|
||||||
public $outgoing_messages = [];
|
public $outgoing_messages = [];
|
||||||
public $new_incoming = [];
|
public $new_incoming = [];
|
||||||
|
|
|
@ -51,7 +51,6 @@ class MTProto extends MTProtoTools
|
||||||
}
|
}
|
||||||
$this->ipv6 = strlen($google) > 0;
|
$this->ipv6 = strlen($google) > 0;
|
||||||
|
|
||||||
|
|
||||||
// Detect device model
|
// Detect device model
|
||||||
$device_model = 'Web server';
|
$device_model = 'Web server';
|
||||||
try {
|
try {
|
||||||
|
@ -59,7 +58,6 @@ class MTProto extends MTProtoTools
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Detect system version
|
// Detect system version
|
||||||
$system_version = phpversion();
|
$system_version = phpversion();
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -243,7 +243,6 @@ class AuthKeyHandler extends AckHandler
|
||||||
|
|
||||||
\danog\MadelineProto\Logger::log(sprintf('Server-client time delta = %.1f s', $this->datacenter->time_delta));
|
\danog\MadelineProto\Logger::log(sprintf('Server-client time delta = %.1f s', $this->datacenter->time_delta));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ***********************************************************************
|
* ***********************************************************************
|
||||||
* Define some needed numbers for BigInteger
|
* Define some needed numbers for BigInteger
|
||||||
|
@ -264,7 +263,6 @@ class AuthKeyHandler extends AckHandler
|
||||||
throw new \danog\MadelineProto\Exception("dh_prime isn't a safe 2048-bit prime (dh_prime isn't a prime).");
|
throw new \danog\MadelineProto\Exception("dh_prime isn't a safe 2048-bit prime (dh_prime isn't a prime).");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ***********************************************************************
|
* ***********************************************************************
|
||||||
* Check validity of dh_prime
|
* Check validity of dh_prime
|
||||||
|
@ -407,7 +405,6 @@ class AuthKeyHandler extends AckHandler
|
||||||
$new_nonce_hash2 = substr(sha1($new_nonce.chr(2).$auth_key_aux_hash, true), -16);
|
$new_nonce_hash2 = substr(sha1($new_nonce.chr(2).$auth_key_aux_hash, true), -16);
|
||||||
$new_nonce_hash3 = substr(sha1($new_nonce.chr(3).$auth_key_aux_hash, true), -16);
|
$new_nonce_hash3 = substr(sha1($new_nonce.chr(3).$auth_key_aux_hash, true), -16);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ***********************************************************************
|
* ***********************************************************************
|
||||||
* Check if the client's nonce and the server's nonce are the same
|
* Check if the client's nonce and the server's nonce are the same
|
||||||
|
|
|
@ -51,7 +51,6 @@ class CallHandler extends AuthKeyHandler
|
||||||
\danog\MadelineProto\Logger::log('Received request to switch to DC '.$dc);
|
\danog\MadelineProto\Logger::log('Received request to switch to DC '.$dc);
|
||||||
$this->switch_dc($dc);
|
$this->switch_dc($dc);
|
||||||
throw new \danog\MadelineProto\Exception('I had to switch to datacenter '.$dc);
|
throw new \danog\MadelineProto\Exception('I had to switch to datacenter '.$dc);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 401:
|
case 401:
|
||||||
switch ($server_answer['error_message']) {
|
switch ($server_answer['error_message']) {
|
||||||
|
|
|
@ -127,7 +127,6 @@ class PrimeModule extends Tools
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
throw new Exception("Couldn't calculate pq!");
|
throw new Exception("Couldn't calculate pq!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@ If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
require_once 'vendor/autoload.php';
|
require_once 'vendor/autoload.php';
|
||||||
|
|
||||||
|
|
||||||
if (file_exists('number.php') && !file_exists('session.madeline')) {
|
if (file_exists('number.php') && !file_exists('session.madeline')) {
|
||||||
include_once 'number.php';
|
include_once 'number.php';
|
||||||
$MadelineProto = new \danog\MadelineProto\API();
|
$MadelineProto = new \danog\MadelineProto\API();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user