Comments (4)
Does that mean we'll have to add an extra dependency for that rule?
@derrabus yea, however I am against adding Wordpress CS after further consideration. Unlike Slevomat, this CS is not for generic use, but mainly it says what "wordpress code should look like". There were cases where some sniffs changed behavior. So e.g. the one I proposed (WordPress.Arrays.ArrayDeclarationSpacing
) checks so many things to give code which looks like whatever the wordpress devs consider standard at any given moment.
So instead, I opened an issue at Slevomat CS - slevomat/coding-standard#1456 and I would like to port some of the sniffs that would be useful for our purpose.
I will likely get time to work on this in November, so I suggest we wait until this is finished and then we can use just Slevomat without additional dependencies.
from coding-standard.
I'd like something like that actually, kinda dislike formatting the later manually which I always do.
from coding-standard.
I had no clue the latter is allowed 🙃 So
#[DiscriminatorMap([
'cc' => Component\ConcreteComponent::class,
'cd' => Decorator\ConcreteDecorator::class,
])]
abstract class Component
is the way to go for me 👍
from coding-standard.
Does that mean we'll have to add an extra dependency for that rule?
from coding-standard.
Related Issues (20)
- Use stable release of slevomat/coding-standard HOT 4
- PSR-12 integration HOT 2
- A phpDoc template closing tag is mistakenly considered belonging to the following function
- False positive using intersection types in type annotation HOT 4
- Add SlevomatCodingStandard.Functions.StrictCall HOT 3
- Forbid more functions
- The php72 test-report job is always successful HOT 5
- doctrine/coding-standard 8.0.0 requires dealerdirect/phpcodesniffer-composer-installer ^0.6.2 HOT 1
- phpcs: ERROR: Referenced sniff "SlevomatCodingStandard.Arrays.SingleLineArrayWhitespace" does not exist HOT 1
- duplicate rules for visibility of class constants
- class and properties with no spaces between them seem to be allowed
- Ignore some case for EarlyExit rule HOT 1
- Consider dropping auto fix of `SlevomatCodingStandard.Classes.ClassConstantVisibility` HOT 5
- suggestion: a good readme HOT 2
- Support for PHPCS ^4.0 HOT 2
- Reconsider enforcement of union types over the nullable ones HOT 6
- New version HOT 5
- Duplicate `RequireOneLineDocComment` in ruleset HOT 1
- Switch to phpcsstandards/codesniffer HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coding-standard.