Hi,
I've googled and did not find anything regarding the 'comma first' formatting for Elcipse PHP formatter.
As an example long method parameter lists with an anonymous function as a parameter are hard to read:
$o_criterion->page_types = array_values( array_filter( $a_item [ 'criteria' ] [ 'page_types' ] [ $j ], function ( $s_page_type ) use($a_page_types ) {
return array_key_exists( $s_page_type, $a_page_types );
} ) );
Is hard to read, with the PHP formatter options can auto format this like:
$o_criterion->page_types = array_values(
array_filter(
$a_item [ 'criteria' ] [ 'page_types' ] [ $j ],
function ( $s_page_type ) use( $a_page_types ) {
return array_key_exists(
$s_page_type,
$a_page_types
);
}
)
);
However for easier debugging and ability to add / remove additional parameters I like to use the 'comma first' formatting; so would like that same block like:
$o_criterion->page_types = array_values(
array_filter(
$a_item [ 'criteria' ] [ 'page_types' ] [ $j ]
, function ( $s_page_type ) use( $a_page_types ) {
return array_key_exists(
$s_page_type
, $a_page_types
);
}
)
);
Or an array like
$codes = [
'one'
, 'two'
, $code
, get_sub_id()
]
Does anyone know how or if the formatter can be setup to format like this?
Regards,
Steve