1
1
# Infinityloop Coding-Standard
2
2
3
- Custom PHP 7.4 ruleset for [ PHP_CodeSniffer] ( https://github.com/squizlabs/PHP_CodeSniffer ) .
4
-
5
- It is designed for PHP 7.4 because of its specific property spacing, which is not plausible without typed properties.
3
+ Custom PHP 8.0 ruleset for [ PHP_CodeSniffer] ( https://github.com/squizlabs/PHP_CodeSniffer ) .
6
4
7
5
## Features
8
6
@@ -107,6 +105,7 @@ Detailed list of Slevomat sniffs with configured settings. Some sniffs are not i
107
105
- ignoreStandaloneIfInScope: true
108
106
- ignoreOneLineTrailingIf: true
109
107
- SlevomatCodingStandard.ControlStructures.RequireNullCoalesceEqualOperator
108
+ - SlevomatCodingStandard.ControlStructures.RequireNullSafeObjectOperator
110
109
- SlevomatCodingStandard.Functions.StaticClosure
111
110
- SlevomatCodingStandard.Operators.DisallowEqualOperators
112
111
- SlevomatCodingStandard.Operators.RequireOnlyStandaloneIncrementAndDecrementOperators
@@ -122,9 +121,6 @@ Excluded sniffs:
122
121
123
122
#### Cleaning
124
123
125
- - SlevomatCodingStandard.Classes.UnusedPrivateElements
126
- - alwaysUsedPropertiesAnnotations: false
127
- - alwaysUsedPropertiesSuffixes: false
128
124
- SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure
129
125
- SlevomatCodingStandard.Functions.UselessParameterDefaultValue
130
126
- SlevomatCodingStandard.Namespaces.UnusedUses
@@ -144,6 +140,7 @@ Excluded sniffs:
144
140
- ignoreUnusedValuesWhenOnlyKeysAreUsedInForeach: true
145
141
- SlevomatCodingStandard.Variables.UselessVariable
146
142
- SlevomatCodingStandard.Exceptions.DeadCatch
143
+ - SlevomatCodingStandard.Exceptions.RequireNonCapturingCatch
147
144
148
145
Excluded sniffs:
149
146
@@ -171,14 +168,16 @@ Excluded sniffs:
171
168
- linesCountBeforeFirstControlStructure: 0
172
169
- linesCountAfterControlStructure: 1
173
170
- linesCountAfterLastControlStructure: 0
174
- - tokensToCheck : [ T_SWITCH, T_TRY, T_IF, T_FOR, T_FOREACH, T_WHILE ]
171
+ - controlStructures : [ switch, try, if, for, foreach, while ]
175
172
- SlevomatCodingStandard.ControlStructures.JumpStatementsSpacing
176
173
- allowSingleLineYieldStacking: whether or not to allow multiple yield/yield from statements in a row without blank lines.
177
- - linesCountBeforeControlStructure: 1
178
- - linesCountBeforeFirstControlStructure: 0
179
- - linesCountAfterControlStructure: 0
180
- - linesCountAfterLastControlStructure: 0
181
- - tokensToCheck: default
174
+ - linesCountBefore: 1
175
+ - linesCountBeforeFirst: 0
176
+ - linesCountAfter: 0
177
+ - linesCountAfterLast: 0
178
+ - linesCountAfterWhenLastInCaseOrDefault: 0
179
+ - linesCountAfterWhenLastInLastCaseOrDefault: 0
180
+ - jumpStatements: [ goto, throw, yield, continue, break, return]
182
181
- SlevomatCodingStandard.ControlStructures.LanguageConstructWithParentheses
183
182
- SlevomatCodingStandard.ControlStructures.NewWithParentheses
184
183
- SlevomatCodingStandard.ControlStructures.RequireMultiLineTernaryOperator
@@ -188,7 +187,8 @@ Excluded sniffs:
188
187
- ignoreMultiLine: false
189
188
- SlevomatCodingStandard.ControlStructures.DisallowYodaComparison
190
189
- SlevomatCodingStandard.Functions.DisallowArrowFunction
191
- - SlevomatCodingStandard.Functions.TrailingCommaInCall
190
+ - SlevomatCodingStandard.Functions.RequireTrailingCommaInCall
191
+ - SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration
192
192
- SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses
193
193
- psr12Compatible: true
194
194
- caseSensitive: true
@@ -220,9 +220,11 @@ Excluded sniffs:
220
220
- SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue
221
221
- SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing
222
222
- SlevomatCodingStandard.TypeHints.PropertyTypeHintSpacing
223
+ - SlevomatCodingStandard.TypeHints.UnionTypeHintFormat
224
+ - withSpaces: no
225
+ - shortNullable: yes
226
+ - nullPosition: last
223
227
- SlevomatCodingStandard.Namespaces.DisallowGroupUse
224
- - SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameAfterKeyword
225
- - keywordsToCheck: T_EXTENDS, T_IMPLEMENETS, T_USE, T_NEW, T_THROW
226
228
- SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions
227
229
- specialExceptionNames: false
228
230
- ignoredNames: default
@@ -237,6 +239,7 @@ Excluded sniffs:
237
239
- SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation
238
240
- SlevomatCodingStandard.Commenting.ForbiddenAnnotations
239
241
- forbiddenAnnotations: @author , @created , @version , @package , @copyright , @license , @throws
242
+ - SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion
240
243
- SlevomatCodingStandard.Commenting.EmptyComment
241
244
- SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration
242
245
- SlevomatCodingStandard.Commenting.UselessFunctionDocComment
0 commit comments