Skip to content

Commit

Permalink
TermInput: Improve type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Feb 9, 2024
1 parent 9a15b3c commit 7d33f04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/FormElement/TermInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ public function getValue($name = null, $default = null)

public function setValue($value)
{
$recipients = $value;
$separatedTerms = $value;
if (is_array($value)) {
$recipients = $value['value'] ?? '';
$separatedTerms = $value['value'] ?? '';
parent::setValue($value);
}

$terms = [];
foreach ($this->parseValue($recipients) as $term) {
foreach ($this->parseValue((string) $separatedTerms) as $term) {
$terms[] = new RegisteredTerm($term);
}

Expand Down

0 comments on commit 7d33f04

Please sign in to comment.