Skip to content

Commit

Permalink
ENH Add generic types (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Jan 23, 2024
1 parent 0e3d8ca commit 556772b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/StringTagField.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ protected function getSuggestURL()
}

/**
* @return ArrayList
* @return ArrayList<ArrayData>
*/
protected function getOptions()
{
Expand Down Expand Up @@ -356,7 +356,6 @@ protected function getTags($term)
{
$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 ?? [])) {
Expand Down
3 changes: 1 addition & 2 deletions src/TagField.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ protected function getSuggestURL()
}

/**
* @return ArrayList
* @return ArrayList<ArrayData>
*/
protected function getOptions($onlySelected = false)
{
Expand Down Expand Up @@ -582,7 +582,6 @@ public function validate($validator)
*/
public function performReadonlyTransformation()
{
/** @var ReadonlyTagField $copy */
$copy = $this->castedCopy(ReadonlyTagField::class);
$copy->setSourceList($this->getSourceList());
$copy->setTitleField($this->getTitleField());
Expand Down

0 comments on commit 556772b

Please sign in to comment.