Skip to content

PHPStan does not detect that shuffle() reindexes array keys #6138

@johnbillion

Description

@johnbillion

Bug report

When an array is passed to shuffle() it gets reindexed from 0. PHPStan does not detect this.

Code snippet that reproduces the problem

Expected output

shuffle() should be aware that the array that's passed to it gets reindexed from 0.

Did PHPStan help you today? Did it make you happy in any way?

Always :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions