humanmade / humanmade/coding-standards

PHPCS not enforcing space after parenthesis when args span multiple lines

Open
#76 4 comments 0 reactions 0 assignees View on GitHub
bug phpcs
Dominant language
PHP
Stars
160
Forks
17
PR merge metrics
No merged PRs in 30d

Description

The following code is NOT flagged as an error, but I would expect it to be. Note missing space after the first `(`.

```
get_extended_template_part('atoms/heading', '4', [
'heading_three' => 'This is a heading 3',
] );
```

However it is correctly enforced if the args are on a single line. e.g.

```
get_extended_template_part('atoms/heading', '4', [ 'heading_three' => 'This is a heading 3' ] );
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.