Skip to content

Commit

Permalink
SelectElement: Add missing phpdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Nov 30, 2022
1 parent dcd3d49 commit a0bd6b4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/FormElement/SelectElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ class SelectElement extends BaseFormElement
/** @var array Disabled select options */
protected $disabledOptions = [];

/** @var array|string */
/** @var array|string|null */
protected $value;

/**
* Get the option with specified value
*
* @param string|int $value
* @param string|int|null $value
*
* @return SelectOption
*
Expand Down Expand Up @@ -96,7 +96,9 @@ public function setDisabledOptions(array $disabledOptions): self
/**
* Get the value of the element
*
* Returns `array` when the attribute `multiple` is set to `true`, `string` otherwise
* Returns `array` when the attribute `multiple` is set to `true`, `string` or `null` otherwise
*
* @return array|string|null
*/
public function getValue()
{
Expand All @@ -123,7 +125,7 @@ public function getNameAttribute()
/**
* Make the selectOption for the specified value and the label
*
* @param string|int $value Value of the option
* @param string|int|null $value Value of the option
* @param string|array $label Label of the option
*
* @return SelectOption|HtmlElement
Expand Down Expand Up @@ -152,9 +154,9 @@ protected function makeOption($value, $label)
}

/**
* Whether the given option is a selected option
* Get whether the given option is selected
*
* @param int|string $optionValue
* @param int|string|null $optionValue
*
* @return bool
*/
Expand Down

0 comments on commit a0bd6b4

Please sign in to comment.