| @@ 154-163 (lines=10) @@ | ||
| 151 | * |
|
| 152 | * @return $this|array|mixed |
|
| 153 | */ |
|
| 154 | public function value($value = null) |
|
| 155 | { |
|
| 156 | if (is_null($value)) { |
|
| 157 | return empty($this->value) ? ($this->getDefault() ?? []) : $this->value; |
|
| 158 | } |
|
| 159 | ||
| 160 | $this->value = (array) $value; |
|
| 161 | ||
| 162 | return $this; |
|
| 163 | } |
|
| 164 | ||
| 165 | /** |
|
| 166 | * {@inheritdoc} |
|
| @@ 779-788 (lines=10) @@ | ||
| 776 | * |
|
| 777 | * @return mixed |
|
| 778 | */ |
|
| 779 | public function value($value = null) |
|
| 780 | { |
|
| 781 | if (is_null($value)) { |
|
| 782 | return is_null($this->value) ? $this->getDefault() : $this->value; |
|
| 783 | } |
|
| 784 | ||
| 785 | $this->value = $value; |
|
| 786 | ||
| 787 | return $this; |
|
| 788 | } |
|
| 789 | ||
| 790 | /** |
|
| 791 | * Set or get data. |
|