This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 233354 - php wrapping array initializer (always/if long) - no new line before ending bracket
Summary: php wrapping array initializer (always/if long) - no new line before ending b...
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal with 2 votes (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-24 23:06 UTC by icaine
Modified: 2016-11-28 07:48 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description icaine 2013-07-24 23:06:31 UTC
//before formatting
$arr = array(1, 2, 3, 4, "b" => 5, "a" => 6);

//after
$arr = array(
	1,
	2,
	3,
	4,
	"b" => 5,
	"a" => 6); //<-- 

//expected
$arr = array(
	1,
	2,
	3,
	4,
	"b" => 5,
	"a" => 6
); //<--
Comment 1 Ondrej Brejla 2013-07-25 13:49:47 UTC
It's an intent to be consistent with other wrapping options, where closing brace is right after last wrapped item.

But I can make an enhancement from this defect and consider if some extra option could be added for this behavior for next release.

Thanks.
Comment 2 PowerKiKi 2016-11-28 07:33:53 UTC
I believe the expected behavior is the correct one, or at least the less surprising one. Could this become the default behavior ?