File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,8 @@ public function errors(): IListOfErrors;
6363 /**
6464 * Get the first error message, if there is one.
6565 *
66- * @param (Closure(UnitEnum): string)|string|null $default the default value to use if there is no error message.
66+ * @param (Closure(UnitEnum): non-empty-string)|non-empty-string|null $default the default value to use if there is no error message.
67+ * @return ($default is Closure|string ? non-empty-string : null)
6768 */
6869 public function error (Closure |string |null $ default = null ): ?string ;
6970
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ function enum_value(int|string|UnitEnum $value): int|string
3232if (!function_exists (__NAMESPACE__ . '\enum_string ' )) {
3333 /**
3434 * Return a string value for an enum.
35+ *
36+ * @return ($value is non-empty-string|UnitEnum ? non-empty-string : string)
3537 */
3638 function enum_string (string |UnitEnum $ value ): string
3739 {
You can’t perform that action at this time.
0 commit comments