doc fixes

This commit is contained in:
Dennis Eichhorn 2022-04-21 23:52:00 +02:00
parent e388e0e862
commit 48ca7db223
4 changed files with 24 additions and 22 deletions

View File

@ -43,8 +43,8 @@ final class Installer extends InstallerAbstract
/**
* Install data from providing modules.
*
* @param ApplicationAbstract $app Application
* @param array $data Additional data
* @param ApplicationAbstract $app Application
* @param array{path?:string, lang?:string, app?:int} $data Additional data
*
* @return array
*
@ -67,7 +67,7 @@ final class Installer extends InstallerAbstract
}
$navData = \json_decode($navFile, true);
if ($navData === false) {
if (!\is_array($navData)) {
throw new \Exception(); // @codeCoverageIgnore
}
@ -95,22 +95,24 @@ final class Installer extends InstallerAbstract
private static function installNavigationLanguage(string $path, string $appName) : void
{
$files = \scandir($path);
if ($files !== false) {
foreach ($files as $file) {
if (\stripos($file, 'Navigation') !== 0) {
continue;
}
if ($files === false) {
return;
}
$localization = include \rtrim($path, '/') . '/' . $file;
if (!\is_file($langPath = __DIR__ . '/../../../Web/' . $appName . '/lang/' . $file)) {
\copy(__DIR__ . '/Install/NavigationSkeleton.php', $langPath);
}
$base = include $langPath;
$new = \array_merge($base, $localization);
\file_put_contents($langPath, '<?php return ' . ArrayParser::serializeArray($new) . ';');
foreach ($files as $file) {
if (\stripos($file, 'Navigation') !== 0) {
continue;
}
$localization = include \rtrim($path, '/') . '/' . $file;
if (!\is_file($langPath = __DIR__ . '/../../../Web/' . $appName . '/lang/' . $file)) {
\copy(__DIR__ . '/Install/NavigationSkeleton.php', $langPath);
}
$base = include $langPath;
$new = \array_merge($base, $localization);
\file_put_contents($langPath, '<?php return ' . ArrayParser::serializeArray($new) . ';');
}
}

View File

@ -16,7 +16,7 @@ Generally, the development philosophy is result orientated. This means that anyo
Developers are encouraged to pick open tasks with high priorities according to their own skill level. Senior developers may directly assign tasks to developers based on their importance. New developers may find it easier to start with a task that has a low priority as they often also have a lower difficulty.
Open tasks can be found in the project overview: [PROJECT.md](../Project/PROJECT.md)
Open tasks can be found in the project overview: [PROJECT.md](https://github.com/Karaka-Management/Organization-Guide/blob/master/Project/PROJECT.md)
Tasks currently in development are prefixed in the priority column with an asterisk `*` and a name tag in the task description of the developer who is working on the task.

View File

@ -173,7 +173,7 @@ final class BackendController extends Controller
*
* @since 1.0.0
*/
public function viewModuleSettings(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
public function viewModuleSettings(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{
$view = new View($this->app->l11nManager, $request, $response);
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1000105001, $request, $response));
@ -208,7 +208,7 @@ final class BackendController extends Controller
*
* @since 1.0.0
*/
public function viewModuleNavElementSettings(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
public function viewModuleNavElementSettings(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/' . static::NAME . '/Admin/Settings/Theme/Backend/settings-nav');
@ -230,7 +230,7 @@ final class BackendController extends Controller
*
* @since 1.0.0
*/
public function viewModuleNavigationList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
public function viewModuleNavigationList(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/Navigation/Admin/Settings/Theme/Backend/modules-nav-list');

View File

@ -46,7 +46,7 @@ final class SearchController extends Controller
*
* @since 1.0.0
*/
public function searchGoto(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
public function searchGoto(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
{
$this->loadLanguage($request, $response, $request->getData('app'));