From af0ea88978fdb947a660e64c867115af1aeca650 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 9 Oct 2017 10:49:23 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/danog/MadelineProto/API.php | 1 + src/danog/MadelineProto/APIFactory.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/danog/MadelineProto/API.php b/src/danog/MadelineProto/API.php index 6006881f..a340e7f2 100644 --- a/src/danog/MadelineProto/API.php +++ b/src/danog/MadelineProto/API.php @@ -97,6 +97,7 @@ class API extends APIFactory public function serialize($filename) { Logger::log([\danog\MadelineProto\Lang::$current_lang['serializing_madelineproto']]); + return Serialization::serialize($filename, $this); } } diff --git a/src/danog/MadelineProto/APIFactory.php b/src/danog/MadelineProto/APIFactory.php index 394aa2b7..bd7a2c45 100644 --- a/src/danog/MadelineProto/APIFactory.php +++ b/src/danog/MadelineProto/APIFactory.php @@ -138,6 +138,7 @@ class APIFactory if ($this->lua === false) { return method_exists($this->API, $this->namespace.$name) ? $this->API->{$this->namespace.$name}(...$arguments) : $this->API->method_call($this->namespace.$name, (isset($arguments[0]) && is_array($arguments[0])) ? $arguments[0] : [], $aargs); } + try { $deserialized = method_exists($this->API, $this->namespace.$name) ? $this->API->{$this->namespace.$name}(...$arguments) : $this->API->method_call($this->namespace.$name, (isset($arguments[0]) && is_array($arguments[0])) ? $arguments[0] : [], $aargs); Lua::convert_objects($deserialized);