Skip to content

Commit e77a9e3

Browse files
committed
Update documentation for serialization-related sniffs
- Added docs for DisableSerializeInterface - Updated docs for DisableMagicSerialize
1 parent fe6b000 commit e77a9e3

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

README.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -117,30 +117,31 @@ Some rules are also included from PHP_CodeSniffer itself, as well as [PHPCSExtra
117117

118118
The following custom rules are in use:
119119

120-
| Sniff Name | Description | Has Config | Auto-Fixable |
121-
|:---------------------------|:-----------------------------------------------------------------------------------------------|:----------:|:------------:|
122-
| `ArgumentTypeDeclaration` | Enforce argument type declaration. | | |
123-
| `DisableCallUserFunc` | Disable usage of `call_user_func`. | | |
124-
| `DisableMagicSerialize` | Disable usage of `__serialize`, `__sleep`, `__unserialize`, `__wakeup`. | | |
125-
| `DisallowShortOpenTag` | Disallow short open PHP tag (short echo tag allowed). | | |
126-
| `ElementNameMinimalLength` | Use minimum 3 chars for names (with a few exclusions) || |
127-
| `EncodingComment` | Detect usage of opening `-*- coding: utf-8 -*-` |||
128-
| `ForbiddenPublicProperty` | No public class properties | | |
129-
| `FunctionBodyStart` | Handle blank line at start of function body. | ||
130-
| `FunctionLength` | Max 50 lines per function/method, excluding blank lines and comments-only lines. || |
131-
| `HookClosureReturn` | Ensure that actions callbacks do not return anything, while filter callbacks return something. | | |
132-
| `HookPriority` | Report usage of `PHP_INT_MAX` and `PHP_INT_MIN` as hook priority. | | |
133-
| `LineLength` | Max 100 chars per line || |
134-
| `NestingLevel` | Max indent level of 3 inside functions || |
135-
| `NoAccessors` | Discourage usage of getters and setters. | | |
136-
| `NoElse` | Discourage usage of `else`. | | |
137-
| `NoRootNamespaceFunctions` | Report usage of global functions in the root namespace. | | |
138-
| `NoTopLevelDefine` | Discourage usage of `define` where `const` is preferable. | | |
139-
| `PropertyPerClassLimit` | Discourage usage of more than 10 properties per class. || |
140-
| `Psr4` | Check PSR-4 compliance || |
141-
| `ReturnTypeDeclaration` | Enforce return type declaration | | |
142-
| `StaticClosure` | Points closures that can be `static`. | ||
143-
| `VariablesName` | Check variable (and properties) names || |
120+
| Sniff Name | Description | Has Config | Auto-Fixable |
121+
|:----------------------------|:-----------------------------------------------------------------------------------------------|:----------:|:------------:|
122+
| `ArgumentTypeDeclaration` | Enforce argument type declaration. | | |
123+
| `DisableCallUserFunc` | Disable usage of `call_user_func`. | | |
124+
| `DisableMagicSerialize` | Disable usage of `__sleep`, `__wakeup`. | | |
125+
| `DisableSerializeInterface` | Disable usage of `Serializable` interface. | | |
126+
| `DisallowShortOpenTag` | Disallow short open PHP tag (short echo tag allowed). | | |
127+
| `ElementNameMinimalLength` | Use minimum 3 chars for names (with a few exclusions) || |
128+
| `EncodingComment` | Detect usage of opening `-*- coding: utf-8 -*-` |||
129+
| `ForbiddenPublicProperty` | No public class properties | | |
130+
| `FunctionBodyStart` | Handle blank line at start of function body. | ||
131+
| `FunctionLength` | Max 50 lines per function/method, excluding blank lines and comments-only lines. || |
132+
| `HookClosureReturn` | Ensure that actions callbacks do not return anything, while filter callbacks return something. | | |
133+
| `HookPriority` | Report usage of `PHP_INT_MAX` and `PHP_INT_MIN` as hook priority. | | |
134+
| `LineLength` | Max 100 chars per line || |
135+
| `NestingLevel` | Max indent level of 3 inside functions || |
136+
| `NoAccessors` | Discourage usage of getters and setters. | | |
137+
| `NoElse` | Discourage usage of `else`. | | |
138+
| `NoRootNamespaceFunctions` | Report usage of global functions in the root namespace. | | |
139+
| `NoTopLevelDefine` | Discourage usage of `define` where `const` is preferable. | | |
140+
| `PropertyPerClassLimit` | Discourage usage of more than 10 properties per class. || |
141+
| `Psr4` | Check PSR-4 compliance || |
142+
| `ReturnTypeDeclaration` | Enforce return type declaration | | |
143+
| `StaticClosure` | Points closures that can be `static`. | ||
144+
| `VariablesName` | Check variable (and properties) names || |
144145

145146
For **notes and configuration**, refer to the [`inpsyde-custom-sniffs.md`](/inpsyde-custom-sniffs.md)
146147
file in this repository.

0 commit comments

Comments
 (0)