Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2017-11-08 12:06:13 +00:00 committed by StyleCI Bot
parent 2cb942b407
commit 983d70a402
2 changed files with 44 additions and 40 deletions

View File

@ -68,6 +68,7 @@ class API extends APIFactory
$this->API = $unserialized->API; $this->API = $unserialized->API;
$this->APIFactory(); $this->APIFactory();
} }
return; return;
} }
$this->API = new MTProto($params); $this->API = new MTProto($params);

View File

@ -99,7 +99,10 @@ class Serialization
if ($unserialized === false) { if ($unserialized === false) {
throw new Exception(\danog\MadelineProto\Lang::$current_lang['deserialization_error']); throw new Exception(\danog\MadelineProto\Lang::$current_lang['deserialization_error']);
} }
if ($unserialized instanceof \danog\MadelineProto\API) $unserialized->session = $filename; if ($unserialized instanceof \danog\MadelineProto\API) {
$unserialized->session = $filename;
}
return $unserialized; return $unserialized;
} }
} }