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

Rule Magento2.Exceptions.TryProcessSystemResources should exclude warnings from "use function .." section #477

Open
ed007m opened this issue Mar 13, 2024 · 3 comments · May be fixed by #478
Assignees
Labels
enhancement Improvements to existing rules Progress: PR created

Comments

@ed007m
Copy link

ed007m commented Mar 13, 2024

Description

There is a false waring case when current sniffer rule detects system resources functions (stream_, socket_) declared in the
"use function .." section.

Expected behavior

When system resource function is declared in the "use function .." section warnings for this code line should be skipped.

Benefits

This will help to skip useless warning cases during code style checks.

Additional information

@ed007m ed007m added the enhancement Improvements to existing rules label Mar 13, 2024
Copy link

m2-assistant bot commented Mar 13, 2024

Hi @ed007m. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.

@fredden
Copy link
Member

fredden commented Mar 13, 2024

@ed007m can you please provide an example PHP file so we can test this / verify the behaviour?

@ed007m
Copy link
Author

ed007m commented Mar 18, 2024

@fredden
Sure, please, check the attachments
Collection.php.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing rules Progress: PR created
Projects
Status: Pull Request In Progress
Development

Successfully merging a pull request may close this issue.

2 participants