ENH Add generic types (#277)

This commit is contained in:
Guy Sartorelli 2024-01-23 13:08:06 +13:00 committed by GitHub
parent 0e3d8ca632
commit 556772b7be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View File

@ -219,7 +219,7 @@ class StringTagField extends DropdownField
}
/**
* @return ArrayList
* @return ArrayList<ArrayData>
*/
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 ?? [])) {

View File

@ -257,7 +257,7 @@ class TagField extends MultiSelectField
}
/**
* @return ArrayList
* @return ArrayList<ArrayData>
*/
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());