Skip to content

Commit

Permalink
Fix rules order on classes documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
edpittol authored Nov 7, 2024
1 parent 7ed8496 commit d5de9ab
Showing 1 changed file with 8 additions and 8 deletions.
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

0 comments on commit d5de9ab

Please sign in to comment.