mirror of
https://github.com/Karaka-Management/oms-Tasks.git
synced 2026-01-11 15:38:40 +00:00
fix phpstan lvl 9 bugs
This commit is contained in:
parent
93934f5b38
commit
888a4065da
|
|
@ -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']));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ if ($open !== null) :
|
|||
<td data-label="<?= $this->getHtml('Tag'); ?>">
|
||||
<?php $tags = $task->getTags(); foreach ($tags as $tag) : ?>
|
||||
<a href="<?= $url; ?>">
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= $tag->icon !== null ? '<i class="' . $this->printHtml($tag->icon ?? '') . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= !empty($tag->icon) ? '<i class="' . $this->printHtml($tag->icon) . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
<td data-label="<?= $this->getHtml('Creator'); ?>">
|
||||
|
|
@ -137,7 +137,7 @@ if ($open !== null) :
|
|||
<td data-label="<?= $this->getHtml('Tag'); ?>">
|
||||
<?php $tags = $task->getTags(); foreach ($tags as $tag) : ?>
|
||||
<a href="<?= $url; ?>">
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= $tag->icon !== null ? '<i class="' . $this->printHtml($tag->icon ?? '') . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= !empty($tag->icon) ? '<i class="' . $this->printHtml($tag->icon) . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
<td data-label="<?= $this->getHtml('Creator'); ?>">
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<?php endif; ?>
|
||||
|
||||
<?php $tags = $task->getTags(); foreach ($tags as $tag) : ?>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= $tag->icon !== null ? '<i class="' . $this->printHtml($tag->icon ?? '') . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= !empty($tag->icon) ? '<i class="' . $this->printHtml($tag->icon) . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user