mirror of
https://github.com/Karaka-Management/oms-Surveys.git
synced 2026-02-18 07:58:41 +00:00
fix phpstan lvl 9 bugs
This commit is contained in:
parent
9eda80b4b7
commit
8479290a99
|
|
@ -107,7 +107,7 @@ final class ApiController extends Controller
|
||||||
$template = new SurveyTemplate();
|
$template = new SurveyTemplate();
|
||||||
$template->start = empty($request->getData('start')) ? null : new \DateTime($request->getData('start'));
|
$template->start = empty($request->getData('start')) ? null : new \DateTime($request->getData('start'));
|
||||||
$template->end = empty($request->getData('end')) ? null : new \DateTime($request->getData('end'));
|
$template->end = empty($request->getData('end')) ? null : new \DateTime($request->getData('end'));
|
||||||
$template->status = $request->getData('status') ?? SurveyStatus::ACTIVE;
|
$template->status = (int) ($request->getData('status') ?? SurveyStatus::ACTIVE);
|
||||||
$template->createdBy = new NullAccount($request->header->account);
|
$template->createdBy = new NullAccount($request->header->account);
|
||||||
|
|
||||||
$l11n = new SurveyTemplateL11n(
|
$l11n = new SurveyTemplateL11n(
|
||||||
|
|
@ -129,7 +129,12 @@ final class ApiController extends Controller
|
||||||
|
|
||||||
$internalResponse = new HttpResponse();
|
$internalResponse = new HttpResponse();
|
||||||
$this->app->moduleManager->get('Tag')->apiTagCreate($request, $internalResponse, null);
|
$this->app->moduleManager->get('Tag')->apiTagCreate($request, $internalResponse, null);
|
||||||
$template->addTag($internalResponse->get($request->uri->__toString())['response']);
|
|
||||||
|
if (!\is_array($data = $internalResponse->get($request->uri->__toString()))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->addTag($data['response']);
|
||||||
} else {
|
} else {
|
||||||
$template->addTag(new NullTag((int) $tag['id']));
|
$template->addTag(new NullTag((int) $tag['id']));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user