Skip to content

Commit 6dd3ddc

Browse files
authored
Merge pull request #18 from php-fig-rectified/feature/new-sniffs
Feature/new sniffs
2 parents 44678bf + efae50c commit 6dd3ddc

File tree

4 files changed

+11
-16
lines changed

4 files changed

+11
-16
lines changed

PSR2R/ruleset.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
<rule ref="PSR12.Namespaces.CompoundNamespaceDepth"/>
7272
<rule ref="PSR12.Operators.OperatorSpacing"/>
7373
<rule ref="PSR12.Functions.NullableTypeDeclaration"/>
74+
<rule ref="PSR12.Functions.ReturnTypeDeclaration"/>
7475

7576
<rule ref="Squiz.Functions.LowercaseFunctionKeywords"/>
7677
<rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/>

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": ">=5.6",
16-
"squizlabs/php_codesniffer": "^3.4.2"
16+
"squizlabs/php_codesniffer": "^3.5.0"
1717
},
1818
"require-dev": {
1919
},

docs/sniffs.md

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

33

4-
The PSR2R standard contains 124 sniffs
4+
The PSR2R standard contains 126 sniffs
55

6-
Generic (20 sniffs)
6+
Generic (21 sniffs)
77
-------------------
88
- Generic.Arrays.DisallowLongArraySyntax
99
- Generic.CodeAnalysis.ForLoopShouldBeWhileLoop
@@ -18,6 +18,7 @@ Generic (20 sniffs)
1818
- Generic.Formatting.NoSpaceAfterCast
1919
- Generic.NamingConventions.UpperCaseConstantName
2020
- Generic.PHP.DeprecatedFunctions
21+
- Generic.PHP.DisallowAlternativePHPTags
2122
- Generic.PHP.DisallowShortOpenTag
2223
- Generic.PHP.ForbiddenFunctions
2324
- Generic.PHP.LowerCaseConstant
@@ -38,10 +39,11 @@ PSR1 (3 sniffs)
3839
- PSR1.Files.SideEffects
3940
- PSR1.Methods.CamelCapsMethodName
4041

41-
PSR12 (5 sniffs)
42+
PSR12 (6 sniffs)
4243
----------------
4344
- PSR12.Classes.ClassInstantiation
4445
- PSR12.Functions.NullableTypeDeclaration
46+
- PSR12.Functions.ReturnTypeDeclaration
4547
- PSR12.Keywords.ShortFormTypeKeywords
4648
- PSR12.Namespaces.CompoundNamespaceDepth
4749
- PSR12.Operators.OperatorSpacing

phpunit.xml.dist

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit
3-
colors="true"
4-
processIsolation="false"
5-
stopOnFailure="false"
6-
bootstrap="./tests/bootstrap.php"
7-
>
2+
<phpunit bootstrap="tests/bootstrap.php">
83
<php>
94
<ini name="memory_limit" value="-1"/>
105
<ini name="apc.enable_cli" value="1"/>
116
</php>
127

138
<!-- Add any additional test suites you want to run here -->
149
<testsuites>
15-
<testsuite name="Sniffer Test Suite">
16-
<directory>./tests/Sniffs</directory>
10+
<testsuite name="psr2r">
11+
<directory>tests/Sniffs/</directory>
1712
</testsuite>
1813
<testsuite name="Extension of PHP_CodeSniffer Test Suite">
1914
<file>tests/AllTests.php</file>
@@ -23,11 +18,8 @@
2318

2419
<filter>
2520
<whitelist processUncoveredFilesFromWhitelist="true">
26-
<directory>./PSR2R</directory>
21+
<directory>PSR2R/</directory>
2722
</whitelist>
28-
<blacklist>
29-
<directory>./vendor</directory>
30-
</blacklist>
3123
</filter>
3224

3325
</phpunit>

0 commit comments

Comments
 (0)