magento / magento-coding-standard

Magento Coding Standard
Open Software License 3.0
343 stars 153 forks source link

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

Open ed007m opened 6 months ago

ed007m commented 6 months ago

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

m2-assistant[bot] commented 6 months ago

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 commented 6 months ago

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

ed007m commented 6 months ago

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