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

Fix rules order on classes documentation #1707

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions doc/classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ Sniff provides the following settings:
* `spacesCountBeforeColon`: the number of spaces before `:`.
* `spacesCountBeforeType`: the number of spaces before type.

#### SlevomatCodingStandard.Classes.ClassLength

Disallows long classes. This sniff provides the following settings:

* `includeComments`: should comments be included in the count (default value is false).
* `includeWhitespace`: should empty lines be included in the count (default value is false).
* `maxLinesLength`: specifies max allowed function lines length (default value is 250).

#### SlevomatCodingStandard.Classes.ClassConstantVisibility 🔧

In PHP 7.1+ it's possible to declare [visibility of class constants](https://wiki.php.net/rfc/class_const_visibility). In a similar vein to optional declaration of visibility for properties and methods which is actually required in sane coding standards, this sniff also requires declaring visibility for all class constants.
Expand All @@ -30,6 +22,14 @@ const FOO = 1; // visibility missing!
public const BAR = 2; // correct
```

#### SlevomatCodingStandard.Classes.ClassLength

Disallows long classes. This sniff provides the following settings:

* `includeComments`: should comments be included in the count (default value is false).
* `includeWhitespace`: should empty lines be included in the count (default value is false).
* `maxLinesLength`: specifies max allowed function lines length (default value is 250).

#### SlevomatCodingStandard.Classes.ClassMemberSpacing 🔧

Sniff checks lines count between different class members, e.g. between last property and first method.
Expand Down
Loading