diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 7e0e357..a963273 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -260,7 +260,12 @@ final class ApiController extends Controller $internalResponse = new HttpResponse(); $this->app->moduleManager->get('Tag')->apiTagCreate($request, $internalResponse, null); - $task->addTag($internalResponse->get($request->uri->__toString())['response']); + + if (!\is_array($data = $internalResponse->get($request->uri->__toString()))) { + continue; + } + + $task->addTag($data['response']); } else { $task->addTag(new NullTag((int) $tag['id'])); } diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 516959f..e747aa8 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -165,7 +165,10 @@ final class BackendController extends Controller implements DashboardElementInte { $view = new TaskView($this->app->l11nManager, $request, $response); - $profileImage = $this->app->appSettings->get(names: SettingsEnum::DEFAULT_PROFILE_IMAGE, module: 'Profile'); + /** @var \Model\Setting $profileImage */ + $profileImage = $this->app->appSettings->get(names: SettingsEnum::DEFAULT_PROFILE_IMAGE, module: 'Profile'); + + /** @var \Modules\Media\Models\Media $image */ $image = MediaMapper::get()->where('id', (int) $profileImage->content)->execute(); $view->defaultProfileImage = $image; diff --git a/Models/TaskMapper.php b/Models/TaskMapper.php index 1eba871..ced186a 100755 --- a/Models/TaskMapper.php +++ b/Models/TaskMapper.php @@ -175,7 +175,8 @@ final class TaskMapper extends DataMapperFactory ->andWhere(AccountRelationMapper::TABLE . '.task_account_account', '=', $user) ->andWhere(AccountRelationMapper::TABLE . '.task_account_duty', '=', DutyType::TO); - return self::getAll()->execute($query); + /** @return array */ + return self::getAll()->execute($query); /** @return array */ } /** diff --git a/Theme/Backend/Components/Tasks/ListView.php b/Theme/Backend/Components/Tasks/ListView.php index 770a7e3..6ef6f2e 100755 --- a/Theme/Backend/Components/Tasks/ListView.php +++ b/Theme/Backend/Components/Tasks/ListView.php @@ -52,6 +52,7 @@ class ListView extends View */ public function render(mixed ...$data) : string { + /** @var array{0: \Modules\Tasks\Models\Task[]} $data */ $this->tasks = $data[0]; return parent::render(); } diff --git a/Theme/Backend/task-dashboard.tpl.php b/Theme/Backend/task-dashboard.tpl.php index fe80934..b14d78b 100755 --- a/Theme/Backend/task-dashboard.tpl.php +++ b/Theme/Backend/task-dashboard.tpl.php @@ -76,7 +76,7 @@ if ($open !== null) : getTags(); foreach ($tags as $tag) : ?> - icon !== null ? '' : ''; ?>printHtml($tag->getL11n()); ?> + icon) ? '' : ''; ?>printHtml($tag->getL11n()); ?> @@ -137,7 +137,7 @@ if ($open !== null) : getTags(); foreach ($tags as $tag) : ?> - icon !== null ? '' : ''; ?>printHtml($tag->getL11n()); ?> + icon) ? '' : ''; ?>printHtml($tag->getL11n()); ?> diff --git a/Theme/Backend/task-single.tpl.php b/Theme/Backend/task-single.tpl.php index 233be0e..e5900ff 100755 --- a/Theme/Backend/task-single.tpl.php +++ b/Theme/Backend/task-single.tpl.php @@ -97,7 +97,7 @@ echo $this->getData('nav')->render(); ?> getTags(); foreach ($tags as $tag) : ?> - icon !== null ? '' : ''; ?>printHtml($tag->getL11n()); ?> + icon) ? '' : ''; ?>printHtml($tag->getL11n()); ?>