Skip to content

Conversation

@junichi11
Copy link
Member

@junichi11 junichi11 commented Nov 22, 2023

Example:

$x = test(
    "test {$test}"
);// enter key here

Before:

$x = test(
    "test {$test}"
);
    // one indentation is added

After:

$x = test(
    "test {$test}"
);
// no indentation

@junichi11 junichi11 added the PHP [ci] enable extra PHP tests (php/php.editor) label Nov 22, 2023
@junichi11 junichi11 added this to the NB21 milestone Nov 22, 2023
- apache#6731
- When a multi-line parameter of a function/method invocation has a string with a variable(e.g. `"example {$example}"`), ignore the variable within the string(i.e. {$example}) to avoid adding extra indentations

Example:
```php
$x = test(
    "test {$test}"
);// enter key here
```

Before:
```php
$x = test(
    "test {$test}"
);
    // one indentation is added
```

After:
```php
$x = test(
    "test {$test}"
);
// no indentation
```
@junichi11 junichi11 force-pushed the php-gh-6731-incorrect-indent branch from 22ec4c7 to dd68f67 Compare November 22, 2023 04:18
@junichi11 junichi11 linked an issue Nov 22, 2023 that may be closed by this pull request
@junichi11 junichi11 requested a review from tmysik November 22, 2023 09:57
Copy link
Member

@tmysik tmysik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@junichi11
Copy link
Member Author

@tmysik Thank you for your quick review!

@junichi11 junichi11 merged commit e91ac62 into apache:php-nb21-features Nov 22, 2023
@junichi11 junichi11 deleted the php-gh-6731-incorrect-indent branch November 22, 2023 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PHP [ci] enable extra PHP tests (php/php.editor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong indentation after multi-line function call

2 participants