Skip to content

Conversation

staabm
Copy link

@staabm staabm commented Nov 26, 2021

with this change static analysis tools are able to detect implementations which throw.

see https://phpstan.org/r/90fcf22e-b99b-4455-bf32-a9a7078fbb39

technically throwing from __toString() is allowed since php 7.4+, but since the contract explicitly mentions this should not be done, I figured declaring the respective phpdoc would be a improvement.

with this change static analysis tools are able to detect implementations which throw.

see https://phpstan.org/r/90fcf22e-b99b-4455-bf32-a9a7078fbb39
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.

1 participant