From 8fc0ebcaa8c0264f96852c5365d28ac823f1fe62 Mon Sep 17 00:00:00 2001 From: Christian Hartmann Date: Mon, 28 Oct 2024 16:33:26 +0100 Subject: [PATCH] fix Signed-off-by: Christian Hartmann --- lib/Controller/ApiController.php | 4 ++-- lib/ResponseDefinitions.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Controller/ApiController.php b/lib/Controller/ApiController.php index 2110c671f..0d72504f9 100644 --- a/lib/Controller/ApiController.php +++ b/lib/Controller/ApiController.php @@ -1081,9 +1081,9 @@ public function reorderOptions(int $formId, int $questionId, array $newOrder) { $oldOrder = $options[$arrayKey]->getOrder(); // Only set order, if it changed. - if ($oldOrder !== $arrayKey + 1) { + if ($oldOrder !== (int)$arrayKey + 1) { // Set Order. ArrayKey counts from zero, order counts from 1. - $options[$arrayKey]->setOrder($arrayKey + 1); + $options[$arrayKey]->setOrder((int)$arrayKey + 1); } } diff --git a/lib/ResponseDefinitions.php b/lib/ResponseDefinitions.php index c77acd061..2bdc76be8 100644 --- a/lib/ResponseDefinitions.php +++ b/lib/ResponseDefinitions.php @@ -49,9 +49,9 @@ * isRequired: bool, * text: string, * name: string, - * options: array, + * options: list, * accept: string[], - * extraSettings: \stdClass + * extraSettings: array * } * * @psalm-type FormsAnswer = array{