Refine rules by blue32a · Pull Request #222 · doctrine/coding-standard · GitHub
Skip to content

Refine rules#222

Open
blue32a wants to merge 3 commits into
doctrine:8.2.xfrom
blue32a:refine-rules
Open

Refine rules#222
blue32a wants to merge 3 commits into
doctrine:8.2.xfrom
blue32a:refine-rules

Conversation

@blue32a

@blue32a blue32a commented Oct 3, 2020

Copy link
Copy Markdown

Squiz.WhiteSpace.CastSpacing

This is included in PSR-12.

vendor/bin/phpcs --standard=PSR12 -e
Squiz (15 sniffs)
-----------------
  Squiz.Classes.ValidClassName
  Squiz.ControlStructures.ControlSignature
  Squiz.ControlStructures.ForEachLoopDeclaration
  Squiz.ControlStructures.ForLoopDeclaration
  Squiz.ControlStructures.LowercaseDeclaration
  Squiz.Functions.FunctionDeclaration
  Squiz.Functions.FunctionDeclarationArgumentSpacing
  Squiz.Functions.LowercaseFunctionKeywords
  Squiz.Functions.MultiLineFunctionDeclaration
  Squiz.Scope.MethodScope
  Squiz.WhiteSpace.CastSpacing
  Squiz.WhiteSpace.ControlStructureSpacing
  Squiz.WhiteSpace.ScopeClosingBrace
  Squiz.WhiteSpace.ScopeKeywordSpacing
  Squiz.WhiteSpace.SuperfluousWhitespace

PSR2.ControlStructures.ControlStructureSpacing

This is not included in PSR-12.

vendor/bin/phpcs --standard=PSR12 -e
PSR2 (9 sniffs)
---------------
  PSR2.Classes.ClassDeclaration
  PSR2.Classes.PropertyDeclaration
  PSR2.ControlStructures.ElseIfDeclaration
  PSR2.ControlStructures.SwitchDeclaration
  PSR2.Files.ClosingTag
  PSR2.Files.EndFileNewline
  PSR2.Methods.FunctionCallSignature
  PSR2.Methods.FunctionClosingBrace
  PSR2.Methods.MethodDeclaration

This is included in PSR-12.
This is not included in PSR-12.
@blue32a blue32a requested a review from a team as a code owner October 3, 2020 11:14
@greg0ire greg0ire changed the base branch from master to 8.2.x October 25, 2020 10:05
@greg0ire

greg0ire commented Apr 3, 2021

Copy link
Copy Markdown
Member

@blue32a

blue32a commented Apr 10, 2021

Copy link
Copy Markdown
Author

Then how does it make PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace unnecessary?

It is included in PSR2.ControlStructures.ControlStructureSpacing and is not installed.
And it is checked by PSR12.ControlStructures.ControlStructureSpacing.
Do you need it?

@greg0ire

Copy link
Copy Markdown
Member

@carusogabriel , you introduced that line, can you maybe chime in?

@Ocramius Ocramius left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM-ish, but requires new major.

Comment thread lib/Doctrine/ruleset.xml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO to be kept

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants