diff --git a/src/Controls/CheckboxListEnum.php b/src/Controls/CheckboxListEnum.php index 5bd57f8..198a9bc 100644 --- a/src/Controls/CheckboxListEnum.php +++ b/src/Controls/CheckboxListEnum.php @@ -42,7 +42,7 @@ public function setEnumType(string $enumType): static public function getCases(): array { /** @var array */ - return Arrays::map($this->getItems(), fn($x, $y) => $this->enumType::make($y)); + return Arrays::map($this->getItems(), fn($v, $k) => $this->enumType::make($k)); } @@ -100,7 +100,7 @@ public function getValue(): array } /** @var array */ - return Arrays::map($this->value, fn($x) => $this->enumType::make($x)); + return Arrays::map($this->value, fn($v) => $this->enumType::make($v)); } diff --git a/src/Controls/RadioListEnum.php b/src/Controls/RadioListEnum.php index 0a93f8a..5ce3187 100644 --- a/src/Controls/RadioListEnum.php +++ b/src/Controls/RadioListEnum.php @@ -43,7 +43,7 @@ public function setEnumType(string $enumType): static public function getCases(): array { /** @var array */ - return Arrays::map($this->getItems(), fn($x, $y) => $this->enumType::make($y)); + return Arrays::map($this->getItems(), fn($v, $k) => $this->enumType::make($k)); } @@ -95,7 +95,7 @@ public function getValue(): ?LabeledEnum public function setDisabled(array|bool $value = true): static { if (is_array($value)) { - $value = Arrays::map($value, fn($x) => $x->value); + $value = Arrays::map($value, fn($v) => $v->value); } return parent::setDisabled($value); diff --git a/src/Controls/SelectBoxEnum.php b/src/Controls/SelectBoxEnum.php index 07c428f..72adced 100644 --- a/src/Controls/SelectBoxEnum.php +++ b/src/Controls/SelectBoxEnum.php @@ -87,7 +87,7 @@ public function getValue(): ?LabeledEnum public function setDisabled(array|bool $value = true): static { if (is_array($value)) { - $value = Arrays::map($value, fn($x) => $x->value); + $value = Arrays::map($value, fn($v) => $v->value); } return parent::setDisabled($value);