Skip to content

Indentation bug in multi-line function call with split strings #807

Description

@cweiske

When a function call contains a string parameter split onto multiple lines, there is an indentation problem:

<?php
myfunc(
    'pages',
    'foo'
    . 'bar'
        . 'baz'
);

The baz line should be indented in the same way as the bar line.
I myself prefer it on the same indentation level as the initial string line. I couldn't find a rule for that in PSR-2 nor PSR-12.

This problem appears in the following styles (C-c .):

  • drupal
  • pear
  • psr2
  • symfony2

Problem does not appear in:

  • wordpress
  • php

PHP Mode v1.26.1-non-vcs (20250602.1308)
emacs 28.2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions