Skip to content

Match Expressions alignments #590

Open
@jacobcassidy

Description

@jacobcassidy

Should Match Expressions have alignment like those under the Generic.Formatting.MultipleStatementAlignment.NotSameWarning and WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAlign rules?

For example, this is not aligned:

$asset_dir = match ( $asset_type ) {
	'style' => 'build/base/css',
	'script' => 'build/base/js',
	'editor_ui_style' => 'build/blocks/css',
	'editor_ui_script' => 'build/blocks/js',
	default   => 'build/base'
};

The desired alignment:

$asset_dir = match ( $asset_type ) {
	'style'            => 'build/base/css',
	'script'           => 'build/base/js',
	'editor_ui_style'  => 'build/blocks/css',
	'editor_ui_script' => 'build/blocks/js',
	default            => 'build/base'
};

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions