hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

hh_format sticks a comma in language constructs

Open HRMsimon opened this issue 11 years ago • 2 comments

If hh_format wraps a line that has an empty call in it, then it sticks a comma after the argument. This isn't valid syntax.

HRMsimon avatar Aug 21 '15 04:08 HRMsimon

The line in question (inside a method, so two indents):

if (empty($this->_data['userGroups'][$item['date_start']][$user_id])) {

HRMsimon avatar Aug 21 '15 04:08 HRMsimon

Same happens with isset, so I suspect it's any language construct that looks like a function.

HRMsimon avatar Aug 21 '15 04:08 HRMsimon