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

Add Sniffs for Array Spacing and Property Types #96

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

tfrommen
Copy link
Member

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

This PR adds three new Sniffs to the Inpsyde standard:

  • SlevomatCodingStandard.Arrays.SingleLineArrayWhitespace
  • SlevomatCodingStandard.TypeHints.PropertyTypeHint
  • Squiz.Arrays.ArrayBracketSpacing

What is the current behavior? (You can also link to an open issue here)

  • Array access and single-line declaration can have arbitrary spacing around square brackets.
  • Properties can have no type information at all.

What is the new behavior (if this is a feature change)?

  • Consistent array access and single-line declaration without undesired whitespace.
  • Well-documented property types, wherever possible.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

No, but existing code that violates the new rules will get flagged, of course.

Other information:

This PR closes issues #78 and #91.

@tfrommen tfrommen merged commit b883fe6 into version/2 Jul 25, 2024
32 checks passed
@tfrommen tfrommen deleted the additional-sniffs branch July 25, 2024 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants