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, "icon": null,
"order": 10, "order": 10,
"from": "Navigation", "from": "Navigation",
"permission": { "permission": 2, "type": null, "element": null }, "permission": { "permission": 2, "category": null, "element": null },
"parent": 1000105001, "parent": 1000105001,
"children": [] "children": []
} }

View File

@ -82,6 +82,16 @@ final class Installer extends InstallerAbstract
return []; 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 private static function installNavigationLanguage(string $path, string $appName) : void
{ {
$files = \scandir($path); $files = \scandir($path);
@ -136,7 +146,7 @@ final class Installer extends InstallerAbstract
$navElement->order = (int) ($data['order'] ?? 1); $navElement->order = (int) ($data['order'] ?? 1);
$navElement->parent = (int) ($data['parent'] ?? 0); $navElement->parent = (int) ($data['parent'] ?? 0);
$navElement->permissionPerm = $data['permission']['permission'] ?? null; $navElement->permissionPerm = $data['permission']['permission'] ?? null;
$navElement->permissionType = $data['permission']['type'] ?? null; $navElement->permissionCategory = $data['permission']['category'] ?? null;
$navElement->permissionElement = $data['permission']['element'] ?? null; $navElement->permissionElement = $data['permission']['element'] ?? null;
NavElementMapper::create()->execute($navElement); NavElementMapper::create()->execute($navElement);