Apply fixes from StyleCI
This commit is contained in:
parent
ec79c6d714
commit
10e5346ae8
@ -26,7 +26,9 @@ class Exception extends \Exception
|
|||||||
if ($file !== null) {
|
if ($file !== null) {
|
||||||
$this->file = $file;
|
$this->file = $file;
|
||||||
}
|
}
|
||||||
if (in_array($message, ['Re-executing query...', 'I had to recreate the temporary authorization key', 'This peer is not present in the internal peer database', "Couldn't get response"])) return;
|
if (in_array($message, ['Re-executing query...', 'I had to recreate the temporary authorization key', 'This peer is not present in the internal peer database', "Couldn't get response"])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
\Rollbar\Rollbar::log($this, debug_backtrace(), 'error');
|
\Rollbar\Rollbar::log($this, debug_backtrace(), 'error');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,7 +310,9 @@ trait TL
|
|||||||
|
|
||||||
if ((!is_array($object) || (isset($object['_']) && $this->constructors->find_by_predicate($object['_'])['type'] !== $type['type'])) && in_array($type['type'], ['User', 'InputUser', 'Chat', 'InputChannel', 'Peer', 'InputPeer'])) {
|
if ((!is_array($object) || (isset($object['_']) && $this->constructors->find_by_predicate($object['_'])['type'] !== $type['type'])) && in_array($type['type'], ['User', 'InputUser', 'Chat', 'InputChannel', 'Peer', 'InputPeer'])) {
|
||||||
$object = $this->get_info($object);
|
$object = $this->get_info($object);
|
||||||
if (!isset($object[$type['type']])) throw new \danog\MadelineProto\Exception("This peer is not present in the internal peer database");
|
if (!isset($object[$type['type']])) {
|
||||||
|
throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database');
|
||||||
|
}
|
||||||
$object = $object[$type['type']];
|
$object = $object[$type['type']];
|
||||||
}
|
}
|
||||||
if (!isset($object['_'])) {
|
if (!isset($object['_'])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user