Closed (won't fix)
Project:
Coder
Version:
7.x-1.x-dev
Component:
Coder Format
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
1 Dec 2012 at 00:07 UTC
Updated:
16 Jan 2016 at 16:41 UTC
Jump to comment: Most recent
coder-format doesn't like empty multi-line arrays like this:
$item = array(
'key' => array(
),
'another' => 1,
);
It will add an unwanted comma at the end of the second line, which is not valid syntax and produces a compile-time error.
Attached patch makes sure we're never inserting commas at the beginning of an array.
| Comment | File | Size | Author |
|---|---|---|---|
| coder-format-empty-arrays.patch | 705 bytes | matt2000 |
Comments
Comment #0.0
matt2000 commentedminor typo fix
Comment #1
klausiCoder format is frozen and will not receive updates. Please use the phpcbf command with Coder 8.x-2.x instead. It can be used to format code for any Drupal version.