Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2017-04-27 09:59:40 +00:00 committed by StyleCI Bot
parent ec79c6d714
commit 10e5346ae8
2 changed files with 6 additions and 2 deletions

View File

@ -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');
} }

View File

@ -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['_'])) {