@sinemacula/coding-standards 1.5.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -166,23 +166,25 @@ native directive - `// phpcs:ignore <code>` for a sniff, `@phpstan-ignore <ident
|
|
|
166
166
|
| `SineMacula.Commenting.RequireNonPromotedParameterComment` | Plain params mixed with promoted ones need a comment. |
|
|
167
167
|
| `SineMacula.Commenting.RequirePromotedPropertyComment` | Every constructor-promoted property needs a doc comment. |
|
|
168
168
|
| `SineMacula.Exceptions.DisallowBaseException` | No throwing the base `\Exception`; throw a domain exception. |
|
|
169
|
+
| `SineMacula.Exceptions.RequireEmptyCatchComment` | An empty catch block must comment its intentional swallow. |
|
|
169
170
|
| `SineMacula.Functions.RequireSensitiveParameter` | Secret-named params need `#[\SensitiveParameter]`. |
|
|
170
|
-
| `SineMacula.Metrics.MaxMethodCount` | A class/interface/trait/enum may declare at most 20 methods. |
|
|
171
|
-
| `SineMacula.Metrics.MethodLength` | A method body may have at most 50 significant lines. |
|
|
171
|
+
| `SineMacula.Metrics.MaxMethodCount` | A class/interface/trait/enum may declare at most 20 methods (tests exempt). |
|
|
172
|
+
| `SineMacula.Metrics.MethodLength` | A method body may have at most 50 significant lines (tests exempt). |
|
|
172
173
|
| `SineMacula.Namespaces.RequireConcernsNamespace` | Traits must live under a `Concerns` namespace segment. |
|
|
173
174
|
| `SineMacula.Namespaces.RequireContractsNamespace` | Interfaces must live under a `Contracts` namespace segment. |
|
|
174
175
|
| `SineMacula.Namespaces.RequireEnumsNamespace` | Enums must live under an `Enums` namespace segment. |
|
|
175
|
-
| `SineMacula.NamingConventions.BooleanMethodName` | `bool
|
|
176
|
+
| `SineMacula.NamingConventions.BooleanMethodName` | `bool` methods are predicates; command verbs/@imperative exempt. |
|
|
176
177
|
| `SineMacula.NamingConventions.DisallowInterfacePrefix` | Interface names must not use the Hungarian `I` prefix. |
|
|
177
178
|
| `SineMacula.NamingConventions.ValidEnumCaseName` | Enum cases must be `SCREAMING_SNAKE_CASE`. |
|
|
178
179
|
| `SineMacula.NamingConventions.ValidGlobalFunctionName` | Global functions must be declared in `snake_case`. |
|
|
179
180
|
| `SineMacula.TypeHints.RequireConstantType` | Class/interface/enum/trait constants must declare a native type. |
|
|
181
|
+
| `SineMacula.WhiteSpace.PromotedConstructorSpacing` | Blank line above each promoted-constructor parameter. |
|
|
180
182
|
|
|
181
183
|
### PHPStan rules
|
|
182
184
|
|
|
183
185
|
| Identifier | Enforces |
|
|
184
186
|
|------------|----------|
|
|
185
|
-
| `sineMacula.mutableStaticProperty` |
|
|
187
|
+
| `sineMacula.mutableStaticProperty` | Static properties written at runtime; `@managed-static` opts out. |
|
|
186
188
|
|
|
187
189
|
## Requirements
|
|
188
190
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sinemacula/coding-standards",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Centralized coding standards, static analysis configurations, and code quality tooling for all Sine Macula repositories.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Ben Carey <bdmc@sinemacula.co.uk>",
|