Applied fixes from StyleCI

This commit is contained in:
Daniil Gentili 2016-08-10 07:57:28 -04:00 committed by StyleCI Bot
parent ad1552df63
commit a505017c45
2 changed files with 9 additions and 6 deletions

View File

@ -285,14 +285,14 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB
// req_DH_params // req_DH_params
$this->log->log('Starting Diffie Hellman key exchange'); $this->log->log('Starting Diffie Hellman key exchange');
$server_dh_params = $this->method_call('req_DH_params', $server_dh_params = $this->method_call('req_DH_params',
[ [
'nonce' => $nonce, 'nonce' => $nonce,
'server_nonce' => $server_nonce, 'server_nonce' => $server_nonce,
'p' => $p_bytes, 'p' => $p_bytes,
'q' => $q_bytes, 'q' => $q_bytes,
'public_key_fingerprint' => $public_key_fingerprint, 'public_key_fingerprint' => $public_key_fingerprint,
'encrypted_data' => $encrypted_data 'encrypted_data' => $encrypted_data,
] ]
); );

View File

@ -98,6 +98,7 @@ class TL
if (!is_numeric($value)) { if (!is_numeric($value)) {
throw new Exception("serialize_param: given value isn't numeric"); throw new Exception("serialize_param: given value isn't numeric");
} }
return \danog\PHP\Struct::pack('<q', $value); return \danog\PHP\Struct::pack('<q', $value);
break; break;
case 'int128': case 'int128':
@ -105,6 +106,7 @@ class TL
if (!is_string($value)) { if (!is_string($value)) {
throw new Exception("serialize_param: given value isn't a string"); throw new Exception("serialize_param: given value isn't a string");
} }
return $value; return $value;
break; break;
case 'string': case 'string':
@ -121,6 +123,7 @@ class TL
$concat .= $value; $concat .= $value;
$concat .= pack('@'.\danog\MadelineProto\Tools::posmod(-$l, 4)); $concat .= pack('@'.\danog\MadelineProto\Tools::posmod(-$l, 4));
} }
return $concat; return $concat;
break; break;
default: default: