Skip to content

[FP] IteratorToArrayKeysCollisionInspection can be skipped when used in methods that reset the key anyway #2002

@jdreesen

Description

@jdreesen
Subject Details
Plugin Php Inspections (EA Ultimate), 2025.5
Language level PHP 8.2

Current behaviour

The inspection is always shown when the second parameter is not set.

Image

Expected behaviour

The inspection is not shown when used as a parameter of functions that reset the keys anyway (such as array_column()).

Environment details

PhpStorm 2025.3.2
Build #PS-253.30387.85, built on January 21, 2026
Source revision: 790528c506585

Runtime version: 21.0.9+10-b1163.94 amd64 (JCEF 137.0.17)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.X11.XToolkit
Linux 6.8.0-100-generic
Ubuntu 24.04.4 LTS; glibc: 2.39
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 10240M
Cores: 16
Current Desktop: ubuntu:GNOME

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions