doctrine / doctrine/coding-standard

Add WordpressArray sniff

Open
#299 4 comments 2 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
320
Forks
50
PR merge metrics
No merged PRs in 30d

Description

I would like to start discussion on adding these rules to doctrine CS:
```xml



tests/*

```
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:
```php
#[DiscriminatorMap([
'cc' => Component\ConcreteComponent::class,
'cd' => Decorator\ConcreteDecorator::class,
])]
abstract class Component
```
over
```php
#[DiscriminatorMap(['cc' => Component\ConcreteComponent::class,
'cd' => Decorator\ConcreteDecorator::class])]
abstract class Component
```

WDYT?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.