magento-coding-standard icon indicating copy to clipboard operation
magento-coding-standard copied to clipboard

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

Open ed007m opened this issue 11 months ago • 3 comments

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 avatar Mar 13 '24 08:03 ed007m

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.

m2-assistant[bot] avatar Mar 13 '24 08:03 m2-assistant[bot]

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

fredden avatar Mar 13 '24 17:03 fredden

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

ed007m avatar Mar 18 '24 14:03 ed007m