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

[false positive] json_decode inspection does not recognize name identifier for the flags argument #1807

Closed
winkbrace opened this issue Feb 7, 2022 · 2 comments

Comments

@winkbrace
Copy link

Subject Details
Plugin Php Inspections (EA Extended)
Language level PHP 8.0

Current behaviour

This line uses name identifiers to skip the default 2nd and 3rd argument.
Unfortunately the inspection seems to look only for a 4th argument, as it is advising to harden the errors handling, which is already there.

$content = json_decode(json: $client->getResponse()->getContent(), flags: JSON_THROW_ON_ERROR);

harden errors handling

Expected behaviour

It should recognize the name identifier flags contains the desired JSON_THROW_ON_ERROR.

Environment details

PHP 8.0
PhpStorm 2021.3.1
Php Inspections (EA Extended) 4.0.7.1

@jdreesen
Copy link
Contributor

jdreesen commented Feb 7, 2022

Duplicate of #1725

@winkbrace
Copy link
Author

Ah, thanks. I didn't find it when looking for name identifier :)

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

No branches or pull requests

2 participants