When I format a foreach with complex structures, it always collapses into 1 line. In other IDE, this does not happen.
example:
before:

        $array = [];
        foreach(
            array_combine(
                array_keys($array),
                array_values($array)
            ) as $item
        ) {
            // do something
        }

after:

        $array = [];
        foreach (array_combine(array_keys($array), array_values($array)) as $item) {
            // do something
        }

    Is it possible to correct this behavior?

    Hello,

    Thank you for pointing this out. We do collapse foreach automatically, but I think it should be configurable.

    We will do it, thanks!

      Write a Reply...