Skip to content

[12.x] Fix return type docblock for Number::abbreviate method#58408

Merged
taylorotwell merged 1 commit intolaravel:12.xfrom
ismaildasci:fix/number-return-types
Jan 19, 2026
Merged

[12.x] Fix return type docblock for Number::abbreviate method#58408
taylorotwell merged 1 commit intolaravel:12.xfrom
ismaildasci:fix/number-return-types

Conversation

@ismaildasci
Copy link
Contributor

The abbreviate method's docblock incorrectly states @return bool|string, but the method actually returns string|false (via forHumans which returns string|false).

This PR fixes the docblock to use @return string|false, which:

  • Accurately reflects the actual return type
  • Maintains consistency with forHumans and summarize methods in the same class
  • Improves IDE autocompletion and static analysis accuracy

The `abbreviate` method returns `string|false` (via `forHumans`), not `bool|string`. This aligns the docblock with the actual return type and maintains consistency with other methods in the class.
@taylorotwell taylorotwell merged commit c8aec50 into laravel:12.x Jan 19, 2026
72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments