@@ -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 (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 $ value = true )
182+ public function setDisabled (bool $ value = true ): static
186183 {
187184 if ($ this ->disabled = (bool ) $ value ) {
188185 $ this ->setValue (null );
@@ -227,9 +224,8 @@ public function isOmitted(): bool
227224
228225 /**
229226 * Generates control's HTML element.
230- * @return Html|string
231227 */
232- public function getControl ()
228+ public function getControl (): Html | string
233229 {
234230 $ this ->setOption ('rendered ' , true );
235231 $ el = clone $ this ->control ;
@@ -245,9 +241,8 @@ public function getControl()
245241
246242 /**
247243 * Generates label's HTML element.
248- * @return Html|string|null
249244 */
250- public function getLabel (string |Stringable |null $ caption = null )
245+ public function getLabel (string |Stringable |null $ caption = null ): Html | string | null
251246 {
252247 $ label = clone $ this ->label ;
253248 $ label ->for = $ this ->getHtmlId ();
@@ -395,13 +390,13 @@ public function translate($value, ...$parameters): mixed
395390
396391 /**
397392 * Adds a validation rule.
398- * @return static
399393 */
400394 public function addRule (
401395 callable |string $ validator ,
402396 string |Stringable |null $ errorMessage = null ,
403397 mixed $ arg = null ,
404- ) {
398+ ): static
399+ {
405400 $ this ->rules ->addRule ($ validator , $ errorMessage , $ arg );
406401 return $ this ;
407402 }
0 commit comments