From 556772b7be1620d034dbd0ac837b138d3b80e593 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Tue, 23 Jan 2024 13:08:06 +1300 Subject: [PATCH] ENH Add generic types (#277) --- src/StringTagField.php | 3 +-- src/TagField.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/StringTagField.php b/src/StringTagField.php index cfd57b8..31e670f 100644 --- a/src/StringTagField.php +++ b/src/StringTagField.php @@ -219,7 +219,7 @@ class StringTagField extends DropdownField } /** - * @return ArrayList + * @return ArrayList */ protected function getOptions() { @@ -356,7 +356,6 @@ class StringTagField extends DropdownField { $items = []; foreach ($this->getOptions() as $i => $tag) { - /** @var ArrayData $tag */ $tagValue = $tag->Value; // Map into a distinct list (prevent duplicates) if (stripos($tagValue ?? '', $term ?? '') !== false && !array_key_exists($tagValue, $items ?? [])) { diff --git a/src/TagField.php b/src/TagField.php index 99bd8fa..3ae22a6 100644 --- a/src/TagField.php +++ b/src/TagField.php @@ -257,7 +257,7 @@ class TagField extends MultiSelectField } /** - * @return ArrayList + * @return ArrayList */ protected function getOptions($onlySelected = false) { @@ -582,7 +582,6 @@ class TagField extends MultiSelectField */ public function performReadonlyTransformation() { - /** @var ReadonlyTagField $copy */ $copy = $this->castedCopy(ReadonlyTagField::class); $copy->setSourceList($this->getSourceList()); $copy->setTitleField($this->getTitleField());