kalessil / phpinspectionsea

A Static Code Analyzer for PHP (a PhpStorm/Idea Plugin)

Home Page:https://plugins.jetbrains.com/plugin/7622?pr=phpStorm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

False positive: This statement seems to be disconnected from its parent foreach.

inDeev opened this issue · comments

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

Current behaviour

Snímek obrazovky 2023-12-18 v 8 07 02

Expected behaviour
No alert shown

This EA looks too dificult for me. In my opinion it is almost not possible to know what exactly affects something out of foreach scope. This EA should be removed, I'm seeing it often and in some cases it helped to me, but in global perspective it has more false positives than true.

@ea-inspections-team: this inspection is receiving a lot of complaints. Can you disable it by default in the next release please?

@kalessil: yes, we will disable it by default.

@inDeev: is addRow a part of any OSS package, or it is a proprietary code base? We would like to research a bit on false-positives vs pure/tinted methods and functions.