From 29c0542d80862ede36650db196cb22383dc44835 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 27 Jul 2017 07:06:20 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/danog/MadelineProto/APIFactory.php | 3 ++- src/danog/MadelineProto/Lua.php | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/danog/MadelineProto/APIFactory.php b/src/danog/MadelineProto/APIFactory.php index 62c8fc30..eb4633ca 100644 --- a/src/danog/MadelineProto/APIFactory.php +++ b/src/danog/MadelineProto/APIFactory.php @@ -138,7 +138,7 @@ class APIFactory $deserialized = method_exists($this->API, $this->namespace.$name) ? $this->API->{$this->namespace.$name}(...$arguments) : $this->API->method_call($this->namespace.$name, (isset($arguments[0]) && $this->is_array($arguments[0])) ? $arguments[0] : [], $aargs); array_walk_recursive($deserialized, function (&$value, $key) { if (is_object($value)) { - $newval = []; + $newval = []; foreach (get_class_methods($value) as $key => $name) { $newval[$key] = [$value, $name]; } @@ -148,6 +148,7 @@ class APIFactory $value = $newval; } }); + return $deserialized; } catch (\danog\MadelineProto\Exception $e) { return ['error_code' => $e->getCode(), 'error' => $e->getMessage()]; diff --git a/src/danog/MadelineProto/Lua.php b/src/danog/MadelineProto/Lua.php index f76334dd..927dfc89 100644 --- a/src/danog/MadelineProto/Lua.php +++ b/src/danog/MadelineProto/Lua.php @@ -62,7 +62,6 @@ class Lua foreach ($this->MadelineProto->get_methods_namespaced() as $method => $namespace) { $this->MadelineProto->{$namespace}->lua = true; } - } public function tdcli_function($params, $cb = null, $cb_extra = null)