1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 07:14:39 +01:00

Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2017-07-28 21:21:36 +00:00 committed by StyleCI Bot
parent ade8c07a2c
commit 12a25163d5

View File

@ -150,7 +150,9 @@ class Lua
{
return $this->Lua->{$name} = $value;
}
public static function convert_objects(&$data) {
public static function convert_objects(&$data)
{
array_walk_recursive($data, function (&$value, $key) {
if (is_object($value)) {
$newval = [];
@ -160,7 +162,9 @@ class Lua
foreach ($value as $key => $name) {
$newval[$key] = $name;
}
if ($newval === []) $newval = $value->__toString();
if ($newval === []) {
$newval = $value->__toString();
}
$value = $newval;
}
});