diff --git a/stubs/CoreGenericFunctions.phpstub b/stubs/CoreGenericFunctions.phpstub index cca9728c3..8a83ed25d 100644 --- a/stubs/CoreGenericFunctions.phpstub +++ b/stubs/CoreGenericFunctions.phpstub @@ -846,10 +846,15 @@ function strrev(string $string): string {} /** * @psalm-pure * - * @psalm-return ( - * $format is positive-int - * ? array - * : int + * @param 0|1|2 $format + * @return ( + * $format is 0 ? + * int : + * ( + * $format is 1 ? + * list : + * array + * ) * ) */ function str_word_count(string $string, int $format = 0, string|null $characters = null) {}