updated backend

This commit is contained in:
Torsten 2020-01-17 10:58:01 +01:00
parent 1fea0f4fe7
commit 11521c2339
3459 changed files with 72735 additions and 168535 deletions

View file

@ -27,7 +27,7 @@ class ArrayConverter
{
/**
* Converts linear messages array to tree-like array.
* For example this rray('foo.bar' => 'value') will be converted to array('foo' => array('bar' => 'value')).
* For example this array('foo.bar' => 'value') will be converted to ['foo' => ['bar' => 'value']].
*
* @param array $messages Linear messages array
*
@ -35,7 +35,7 @@ class ArrayConverter
*/
public static function expandToTree(array $messages)
{
$tree = array();
$tree = [];
foreach ($messages as $id => $value) {
$referenceToElement = &self::getElementByPath($tree, explode('.', $id));
@ -69,7 +69,7 @@ class ArrayConverter
$elem = &$elem[$part];
}
if (\is_array($elem) && \count($elem) > 0 && $parentOfElem) {
if ($elem && \is_array($elem) && $parentOfElem) {
/* Process next case:
* 'foo.bar': 'test1'
* 'foo': 'test2'