From 0ba85b94cacddb992941f22e23e2a61bfc830980 Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:36:19 +0100 Subject: [PATCH] FieldConfigForm: Declare template field config type --- application/forms/Config/FieldConfigForm.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/forms/Config/FieldConfigForm.php b/application/forms/Config/FieldConfigForm.php index d738bf2..c82f478 100644 --- a/application/forms/Config/FieldConfigForm.php +++ b/application/forms/Config/FieldConfigForm.php @@ -5,6 +5,7 @@ namespace Icinga\Module\Jira\Forms\Config; use Icinga\Application\Config; +use Icinga\Data\ConfigObject; use Icinga\Module\Jira\RestApi; use Icinga\Web\Session; use ipl\Html\Contract\FormSubmitElement; @@ -51,9 +52,10 @@ public function __construct(RestApi $jira, string $templateName, $fieldId = null $this->fieldId = $fieldId; } - $templateFields = $this->templateConfig->getSection($templateName)->toArray(); + /** @var ConfigObject $templateFields */ + $templateFields = $this->templateConfig->getSection($templateName); - $this->fieldValue = $templateFields[$fieldId]; + $this->fieldValue = $templateFields->toArray()[$fieldId]; } }