Skip to content

Conversation

@k00ni
Copy link
Contributor

@k00ni k00ni commented Sep 25, 2025

This PR fixes toHtml's docblock of the return types.

Method toHtml had @return string|null|\LogicException in the PHPDoc, but an instance of LogicException is never returned, only thrown when a certain situation occurs. Also duplicating return values in PHPDoc as well as in the code might lead to outdated code.

The current situation confuses PHPStan and one must add custom PHPDoc to "force" a certain behavior.

Refactor toHtml method to return nullable string and add exception documentation.
@oladoyinbov oladoyinbov merged commit 7f0574d into fastvolt:v0.2.4 Oct 15, 2025
1 check passed
@k00ni k00ni deleted the patch-1 branch October 16, 2025 07:04
@k00ni
Copy link
Contributor Author

k00ni commented Oct 23, 2025

@oladoyinbov It would be great if you could release a new minor version which includes this change.

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