Skip to content

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.

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.

[Feature Request]: Enforce no spaces in array brackets [Feature Request]: Add a sniff to enforce property type

2 participants