phpstan and phpcs fixes

This commit is contained in:
Dennis Eichhorn 2022-03-29 16:41:17 +02:00
parent d26fece31c
commit e3c394051c
2 changed files with 28 additions and 18 deletions

View File

@ -10,7 +10,7 @@
"icon": null,
"order": 10,
"from": "Navigation",
"permission": { "permission": 2, "type": null, "element": null },
"permission": { "permission": 2, "category": null, "element": null },
"parent": 1000105001,
"children": []
}

View File

@ -82,6 +82,16 @@ final class Installer extends InstallerAbstract
return [];
}
/**
* Install language file for navigation
*
* @param string $path Path of the navigation language files
* @param string $appName Application name of the navigation elements
*
* @return void
*
* @since 1.0.0
*/
private static function installNavigationLanguage(string $path, string $appName) : void
{
$files = \scandir($path);
@ -136,7 +146,7 @@ final class Installer extends InstallerAbstract
$navElement->order = (int) ($data['order'] ?? 1);
$navElement->parent = (int) ($data['parent'] ?? 0);
$navElement->permissionPerm = $data['permission']['permission'] ?? null;
$navElement->permissionType = $data['permission']['type'] ?? null;
$navElement->permissionCategory = $data['permission']['category'] ?? null;
$navElement->permissionElement = $data['permission']['element'] ?? null;
NavElementMapper::create()->execute($navElement);