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