Skip to content
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

Add missing throws exception #2077

Merged
merged 1 commit into from
Jun 20, 2022
Merged

Add missing throws exception #2077

merged 1 commit into from
Jun 20, 2022

Conversation

franmomu
Copy link
Contributor

To reach level 4 of PHPStan, there are a couple of issues in tests about exceptions never thrown, like:

 ------ -------------------------------------------------------------------------------------
  Line   tests/Transport/AbstractTransportTest.php
 ------ -------------------------------------------------------------------------------------
  136    Dead catch - Elastica\Exception\ResponseException is never thrown in the try block.
 ------ -------------------------------------------------------------------------------------

This PR adds throws InvalidException to methods which call getParam directly (there are already other with it) and also adds ResponseException and propagates it.

@ruflin ruflin merged commit f153df9 into ruflin:master Jun 20, 2022
@franmomu franmomu deleted the missing_throws branch June 20, 2022 09:13
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