@@ -134,10 +134,9 @@ public function getHtmlName(): string
134134
135135 /**
136136 * Sets control's value.
137- * @return static
138137 * @internal
139138 */
140- public function setValue (mixed $ value )
139+ public function setValue ($ value ): static
141140 {
142141 $ this ->value = $ value ;
143142 return $ this ;
@@ -148,7 +147,7 @@ public function setValue(mixed $value)
148147 * Returns control's value.
149148 * @return mixed
150149 */
151- public function getValue ()
150+ public function getValue (): mixed
152151 {
153152 return $ this ->value ;
154153 }
@@ -166,9 +165,8 @@ public function isFilled(): bool
166165
167166 /**
168167 * Sets control's default value.
169- * @return static
170168 */
171- public function setDefaultValue ($ value )
169+ public function setDefaultValue ($ value ): static
172170 {
173171 $ form = $ this ->getForm (throw: false );
174172 if ($ this ->isDisabled () || !$ form || !$ form ->isAnchored () || !$ form ->isSubmitted ()) {
@@ -181,9 +179,8 @@ public function setDefaultValue($value)
181179
182180 /**
183181 * Disables or enables control.
184- * @return static
185182 */
186- public function setDisabled (bool $ state = true )
183+ public function setDisabled (bool $ state = true ): static
187184 {
188185 $ this ->disabled = $ state ;
189186 if ($ state ) {
@@ -229,9 +226,8 @@ public function isOmitted(): bool
229226
230227 /**
231228 * Generates control's HTML element.
232- * @return Html|string
233229 */
234- public function getControl ()
230+ public function getControl (): Html | string
235231 {
236232 $ this ->setOption ('rendered ' , true );
237233 $ el = clone $ this ->control ;
@@ -247,9 +243,8 @@ public function getControl()
247243
248244 /**
249245 * Generates label's HTML element.
250- * @return Html|string|null
251246 */
252- public function getLabel (string |Stringable |null $ caption = null )
247+ public function getLabel (string |Stringable |null $ caption = null ): Html | string | null
253248 {
254249 $ label = clone $ this ->label ;
255250 $ label ->for = $ this ->getHtmlId ();
@@ -397,13 +392,13 @@ public function translate($value, ...$parameters): mixed
397392
398393 /**
399394 * Adds a validation rule.
400- * @return static
401395 */
402396 public function addRule (
403397 callable |string $ validator ,
404398 string |Stringable |null $ errorMessage = null ,
405399 mixed $ arg = null ,
406- ) {
400+ ): static
401+ {
407402 $ this ->rules ->addRule ($ validator , $ errorMessage , $ arg );
408403 return $ this ;
409404 }
0 commit comments