Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an array formatting in a match arm #5186 #5685

Merged

Conversation

junichi11
Copy link
Member

e.g.

match(true){
	'test' => [
		'key' => 'value',
		],
};

Before: An array is broken

match (true) {
    'test' => [
'key' => 'value',
    ],
};

After:

match (true) {
    'test' => [
        'key' => 'value',
    ],
};

- apache#5186

e.g.
```php
match(true){
	'test' => [
		'key' => 'value',
		],
};
```

Before: An array is broken
```php
match (true) {
    'test' => [
'key' => 'value',
    ],
};
```

After:
```php
match (true) {
    'test' => [
        'key' => 'value',
    ],
};
```
@junichi11 junichi11 added the PHP [ci] enable extra PHP tests (php/php.editor) label Mar 20, 2023
@junichi11 junichi11 added this to the NB18 milestone Mar 20, 2023
@junichi11 junichi11 linked an issue Mar 20, 2023 that may be closed by this pull request
@junichi11 junichi11 requested a review from tmysik March 21, 2023 00:50
@junichi11
Copy link
Member Author

@tmysik Could you please have a look at this? If there is no problem, let's merge it. Thanks!

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.

Nice, thanks.

@tmysik tmysik merged commit ddb1233 into apache:master Mar 21, 2023
@junichi11 junichi11 deleted the php-gh-5186-array-formatting-in-match-arm branch March 21, 2023 23:22
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.

[PHP] Match operator formatting with arrays is broken
2 participants