Skip to content

Commit c9e4659

Browse files
authored
Add new PSR4 sniff (#34)
* Add new PSR4 sniff
1 parent 2534f75 commit c9e4659

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

PSR2R/ruleset.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison"/>
115115
<rule ref="SlevomatCodingStandard.ControlStructures.JumpStatementsSpacing"/>
116116

117+
<rule ref="PhpCollective.Classes.Psr4"/>
117118
<rule ref="PhpCollective.Classes.MethodDeclaration"/>
118119
<rule ref="PhpCollective.Classes.MethodArgumentDefaultValue"/>
119120
<rule ref="PhpCollective.Classes.MethodTypeHint"/>

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
],
1414
"require": {
1515
"php": ">=8.1",
16-
"php-collective/code-sniffer": "^0.2",
16+
"php-collective/code-sniffer": "^0.2.6",
1717
"slevomat/coding-standard": "^8.3.0",
1818
"squizlabs/php_codesniffer": "^3.7.0"
1919
},

docs/sniffs.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PSR2R Code Sniffer
22

3-
The PSR2R standard contains 190 sniffs
3+
The PSR2R standard contains 191 sniffs
44

55
Generic (22 sniffs)
66
-------------------
@@ -33,13 +33,14 @@ PEAR (3 sniffs)
3333
- PEAR.Functions.ValidDefaultValue
3434
- PEAR.NamingConventions.ValidClassName
3535

36-
PhpCollective (38 sniffs)
36+
PhpCollective (39 sniffs)
3737
-------------------------
3838
- PhpCollective.Classes.ClassFileName
3939
- PhpCollective.Classes.MethodArgumentDefaultValue
4040
- PhpCollective.Classes.MethodDeclaration
4141
- PhpCollective.Classes.MethodTypeHint
4242
- PhpCollective.Classes.PropertyDefaultValue
43+
- PhpCollective.Classes.Psr4
4344
- PhpCollective.Classes.ReturnTypeHint
4445
- PhpCollective.Classes.SelfAccessor
4546
- PhpCollective.Commenting.Attributes

0 commit comments

Comments
 (0)