@@ -133,10 +133,9 @@ public function getHtmlName(): string
133133
134134 /**
135135 * Sets control's value.
136- * @return static
137136 * @internal
138137 */
139- public function setValue (mixed $ value )
138+ public function setValue ($ value ): static
140139 {
141140 $ this ->value = $ value ;
142141 return $ this ;
@@ -147,7 +146,7 @@ public function setValue(mixed $value)
147146 * Returns control's value.
148147 * @return mixed
149148 */
150- public function getValue ()
149+ public function getValue (): mixed
151150 {
152151 return $ this ->value ;
153152 }
@@ -165,9 +164,8 @@ public function isFilled(): bool
165164
166165 /**
167166 * Sets control's default value.
168- * @return static
169167 */
170- public function setDefaultValue ($ value )
168+ public function setDefaultValue ($ value ): static
171169 {
172170 $ form = $ this ->getForm (throw: false );
173171 if ($ this ->isDisabled () || !$ form || !$ form ->isAnchored () || !$ form ->isSubmitted ()) {
@@ -180,9 +178,8 @@ public function setDefaultValue($value)
180178
181179 /**
182180 * Disables or enables control.
183- * @return static
184181 */
185- public function setDisabled (bool $ state = true )
182+ public function setDisabled (bool $ state = true ): static
186183 {
187184 $ this ->disabled = $ state ;
188185 if ($ state ) {
@@ -228,9 +225,8 @@ public function isOmitted(): bool
228225
229226 /**
230227 * Generates control's HTML element.
231- * @return Html|string
232228 */
233- public function getControl ()
229+ public function getControl (): Html | string
234230 {
235231 $ this ->setOption ('rendered ' , true );
236232 $ el = clone $ this ->control ;
@@ -246,9 +242,8 @@ public function getControl()
246242
247243 /**
248244 * Generates label's HTML element.
249- * @return Html|string|null
250245 */
251- public function getLabel (string |Stringable |null $ caption = null )
246+ public function getLabel (string |Stringable |null $ caption = null ): Html | string | null
252247 {
253248 $ label = clone $ this ->label ;
254249 $ label ->for = $ this ->getHtmlId ();
@@ -396,13 +391,13 @@ public function translate($value, ...$parameters): mixed
396391
397392 /**
398393 * Adds a validation rule.
399- * @return static
400394 */
401395 public function addRule (
402396 callable |string $ validator ,
403397 string |Stringable |null $ errorMessage = null ,
404398 mixed $ arg = null ,
405- ) {
399+ ): static
400+ {
406401 $ this ->rules ->addRule ($ validator , $ errorMessage , $ arg );
407402 return $ this ;
408403 }
0 commit comments