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 Dec 21, 2022
1 parent 53ac08a commit b5de880
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 @@ -90,7 +90,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 @@ -117,7 +119,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 @@ -146,9 +148,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 b5de880

Please sign in to comment.