@@ 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} |
@@ 563-572 (lines=10) @@ | ||
560 | * |
|
561 | * @return mixed |
|
562 | */ |
|
563 | public function value($value = null) |
|
564 | { |
|
565 | if (is_null($value)) { |
|
566 | return is_null($this->value) ? $this->getDefault() : $this->value; |
|
567 | } |
|
568 | ||
569 | $this->value = $value; |
|
570 | ||
571 | return $this; |
|
572 | } |
|
573 | ||
574 | /** |
|
575 | * Set or get data. |