Skip to content

Add @throws tags to the public API #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 27, 2022
Merged

Add @throws tags to the public API #21

merged 1 commit into from
Dec 27, 2022

Conversation

lukeify
Copy link
Contributor

@lukeify lukeify commented Dec 27, 2022

Description

👋, thanks for this package! This is a very minor change that adds @throws tags to the docblocks of the json5_decode function and Json5Decoder::decode method—as some IDE's (namely, PhpStorm) don't seem to be able to infer that both of these calls can throw, which leads to inspections about unnecessarily catching SyntaxError's.

How has this been tested?

No new tests needed, but composer check-style reports no problems.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • My pull request addresses exactly one patch/feature.
  • I have created a branch for this patch/feature.
  • Each individual commit in the pull request is meaningful.

@colinodell
Copy link
Owner

Thanks for the contribution! I'll get this released in the next day or so.

@colinodell colinodell merged commit 5a3c083 into colinodell:main Dec 27, 2022
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