-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
I would like to start discussion on adding these rules to doctrine CS:
<rule ref="WordPress.Arrays.ArrayDeclarationSpacing">
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceAfterArrayOpener"/>
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceBeforeArrayCloser"/>
<exclude-pattern>tests/*</exclude-pattern>
</rule>
I got this idea when checking https://github.com/doctrine/orm/pull/10126/files#diff-71c09c517db3322ed613e4cdf6cd41ea2323bf44c1677d3c249dd83da4fbeb25R29-R30
The main argument for this change is that together with SlevomatCodingStandard.Arrays.TrailingArrayComma.MissingTrailingComma
which is already applied this makes for much cleaner diffs when making changes.
I also prefer:
#[DiscriminatorMap([
'cc' => Component\ConcreteComponent::class,
'cd' => Decorator\ConcreteDecorator::class,
])]
abstract class Component
over
#[DiscriminatorMap(['cc' => Component\ConcreteComponent::class,
'cd' => Decorator\ConcreteDecorator::class])]
abstract class Component
WDYT?
simPod and greg0ire
Metadata
Metadata
Assignees
Labels
No labels