WordPress-Coding-Standards/WordPress-Coding-Standards — pull request #134 by westonruter (2013-12-11 06:40:13+00:00)
Title: "Each line in an array declaration must end in a comma" does not allow for inline comments

Hiya,

I regularly come across the `Each line in an array declaration must end in a comma` error when I have comments behind the array entries - even though the entry itself has a comma at the end.

Similarly, I get this same error in the rare occasions when the array entry is a multi-line string.

Is this by design or are these false positives ?

Please find below some code example code which can be used for unit tests:

**Problem code example 1 - inline comments**, typical example from a settings field definition:
```php
$var = array(
'field'	=> 'title',
'type'	=> 'text',
'value'	=> '', // (translated) text added in set_properties()
'label'	=> '', // (translated) text added in set_properties()
);
```

**Problem code example 2 - multi-line string**, typical example for when you want to keep generated html properly indented in the html source too:
```php
$var = array(
'tab_template'	=> '

%s
',
'panel_template'	=> '

%s

',
);
```