@@ -96,13 +96,6 @@ See http://www.php-fig.org/psr/psr-1/ and http://www.php-fig.org/psr/psr-2/.
9696The tree of used rules are listed in the ` /docs/rules-list/psr.md ` file in this repo.
9797
9898
99- ## VariableAnalysis
100-
101- See https://github.com/sirbrillig/phpcs-variable-analysis
102-
103- The tree of used rules are listed in the ` /docs/rules-list/variable-analysis.md ` file in this repo.
104-
105-
10699## Neutron Standard
107100
108101See https://github.com/Automattic/phpcs-neutron-standard
@@ -134,18 +127,22 @@ The tree of used rules are listed in the `/docs/rules-list/generic.md` file in t
134127
135128## Custom Rules
136129
137- Few custom rules are also in use, highly derived from Object Calisthenics
138- see (https://github.com/object-calisthenics/phpcs-calisthenics-rules ).
139-
130+ Few custom rules are also in use.
140131Customs rules are:
141132
142- - Only 2 levels of indentation per Method
143- - Do not use "else" keyword
133+ - Enforce argument type declaration, with few exception (e.g. hook callbacks or ` ArrayAccess ` methods)
134+ - Ensure that any assignment inside conditions in wrapped in parenthesis
135+ - Disallow short open PHP tag
144136- Use minimum 3 chars for names (with a few exclusions)
145- - No public properties
146- - No setters
147- - Max 10 properties per class
148- - Max 50 lines per method
137+ - No public class properties
138+ - Max 50 lines per function/method, excluding blank lines and comments-only lines.
139+ - Ensure that actions callbacks do not return anything, while filter callbacks return something.
140+ - Max 100 chars per line, excluding leading indent size and long string inWP translation functions
141+ - Discourage usage of getters and setters.
142+ - Discourage usage of ` else ` .
143+ - Discourage usage of ` define ` where ` const ` is preferable.
144+ - Discourage usage of more than 10 properties per class.
145+ - Enforce return type declaration, with few exceptions (e.g. hook callbacks or ` ArrayAccess ` methods)
149146
150147The tree of used rules are listed in the ` /docs/rules-list/custom.md ` file in this repo.
151148
0 commit comments