Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Universal.WhiteSpace.AnonClassKeywordSpacing sniff #120

Merged
merged 1 commit into from
Jul 22, 2022

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Jul 22, 2022

Checks the amount of spacing between the class keyword and the open parenthesis (if any) for anonymous class declarations.

The expected amount of spacing is configurable and defaults to 0.

The default value of 0 has been decided upon based on scanning a not insignificant number of codebases and determining the prevailing style used for anonymous classes.
It is also in line with the previously proposed errata for PSR12.

Includes fixer.
Includes unit tests.
Includes documentation.
Includes metrics.

Checks the amount of spacing between the `class` keyword and the open parenthesis (if any) for anonymous class declarations.

The expected amount of spacing is configurable and defaults to `0`.

The default value of `0` has been decided upon based on scanning a not insignificant number of codebases and determining the prevailing style used for anonymous classes.
It is also in line with the previously proposed [errata for PSR12](php-fig/fig-standards#1206).

Includes fixer.
Includes unit tests.
Includes documentation.
Includes metrics.
@jrfnl jrfnl force-pushed the universal/new-anonclasskeywordspacing-sniff branch from 72657e1 to 7b67808 Compare July 22, 2022 21:27
@jrfnl jrfnl enabled auto-merge July 22, 2022 21:29
@jrfnl jrfnl merged commit 79a77b7 into develop Jul 22, 2022
@jrfnl jrfnl deleted the universal/new-anonclasskeywordspacing-sniff branch July 22, 2022 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant