Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
bytehead committed Jan 16, 2022
1 parent 9f56fda commit a4762f9
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ public function generate(): string
return implode('', $fields);
}

protected function isSelected($option): string
protected function isSelected($arrOption): string
{
if (empty($this->varValue) && empty($_POST) && ($option['default'] ?? null))
if (empty($this->varValue) && empty($_POST) && ($arrOption['default'] ?? null))
{
return static::optionSelected((string) 1, 1);
return ' selected';
}

return static::optionSelected(
$option['value'] ?? null,
$this->varValue[$option['index']] ?? null
$arrOption['value'] ?? null,
$this->varValue[$arrOption['index']] ?? null
);
}

Expand Down

0 comments on commit a4762f9

Please sign in to comment.