Skip to content

Comments

Improve File::toKilobytes() DocBlock return type#58811

Merged
taylorotwell merged 2 commits intolaravel:12.xfrom
Amirhf1:improve-file-tokilobytes-docblock
Feb 14, 2026
Merged

Improve File::toKilobytes() DocBlock return type#58811
taylorotwell merged 2 commits intolaravel:12.xfrom
Amirhf1:improve-file-tokilobytes-docblock

Conversation

@Amirhf1
Copy link
Contributor

@Amirhf1 Amirhf1 commented Feb 14, 2026

Replace @return mixed with @return int|float for the toKilobytes() method in the File validation rule. The method returns either an integer (when $size is passed as int) or a float (from round() when processing string sizes with kb/mb/gb/tb suffixes), so the updated DocBlock better reflects the actual return types and improves IDE support.

Replace @return mixed with int|float for better IDE support and type clarity.
Copy link
Contributor Author

@Amirhf1 Amirhf1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I've updated the PR with the requested changes :)

@taylorotwell taylorotwell merged commit 34b64b7 into laravel:12.x Feb 14, 2026
45 of 70 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.

3 participants