From 71c159b690c1604fab139ee31543f52c024691d2 Mon Sep 17 00:00:00 2001 From: Demian Katz Date: Thu, 11 May 2023 09:17:38 -0400 Subject: [PATCH] Fix setOptions typehints. --- src/Form/Element/ObjectMultiCheckbox.php | 2 +- src/Form/Element/ObjectRadio.php | 2 +- src/Form/Element/ObjectSelect.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Form/Element/ObjectMultiCheckbox.php b/src/Form/Element/ObjectMultiCheckbox.php index 44ab1773..48f0390a 100644 --- a/src/Form/Element/ObjectMultiCheckbox.php +++ b/src/Form/Element/ObjectMultiCheckbox.php @@ -30,7 +30,7 @@ public function setOptions(iterable $options): self /** * @return $this */ - public function setOption(mixed $key, mixed $value): self + public function setOption(string $key, mixed $value): self { $this->getProxy()->setOptions([$key => $value]); diff --git a/src/Form/Element/ObjectRadio.php b/src/Form/Element/ObjectRadio.php index 0cd921c8..c873c235 100644 --- a/src/Form/Element/ObjectRadio.php +++ b/src/Form/Element/ObjectRadio.php @@ -25,7 +25,7 @@ public function setOptions(iterable $options): self /** * @return $this */ - public function setOption(mixed $key, mixed $value): self + public function setOption(string $key, mixed $value): self { $this->getProxy()->setOptions([$key => $value]); diff --git a/src/Form/Element/ObjectSelect.php b/src/Form/Element/ObjectSelect.php index e16de534..270021a1 100644 --- a/src/Form/Element/ObjectSelect.php +++ b/src/Form/Element/ObjectSelect.php @@ -30,7 +30,7 @@ public function setOptions(iterable $options): self /** * @return $this */ - public function setOption(mixed $key, mixed $value): self + public function setOption(string $key, mixed $value): self { $this->getProxy()->setOptions([$key => $value]);