Skip to content

Commit b424347

Browse files
committed
Docs
1 parent 1ce7c7e commit b424347

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

docs/README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,26 +52,22 @@ See CS sniffer docs for details, but in general using `severity` of `0` can sile
5252
```
5353

5454
### Excluding certain sniffs
55-
You can also completely exclude certain sniffs, e.g. if you are on a PHP 8+ project and
56-
want to use all the new language features:
55+
You can also completely exclude certain sniffs:
5756
```xml
5857
<rule ref="vendor/php-collective/code-sniffer/PhpCollective/ruleset.xml">
59-
<exclude name="SlevomatCodingStandard.Functions.DisallowNamedArguments"/>
60-
<exclude name="SlevomatCodingStandard.Functions.DisallowTrailingCommaInDeclaration"/>
61-
<exclude name="SlevomatCodingStandard.Classes.DisallowConstructorPropertyPromotion"/>
62-
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowNullSafeObjectOperator"/>
58+
<exclude name="PhpCollective.ControlStructures.DisallowCloakingCheck"/>
6359
...
6460
</rule>
6561
```
66-
They are shipped by default to avoid PHP8-creep into PHP7.4+ code.
62+
Some sniffs are shipped by default to avoid PHP 8.2+ creep into PHP 8.1 code.
6763

6864
## Customize PHP version safety
6965

7066
If you want to enable `PhpCollective.Internal.DisallowFunctions` for your project level, set this into your `phpcs.xml` file:
7167
```xml
7268
<rule ref="PhpCollective.Internal.DisallowFunctions">
7369
<properties>
74-
<property name="phpVersion" value="7.4"/>
70+
<property name="phpVersion" value="8.1"/>
7571
</properties>
7672
</rule>
7773
```
@@ -120,7 +116,7 @@ You can also use `"FQCN"` of the sniff instead (".." quotes are important as the
120116
Tip: When running it without argument, it shows you the sniffs that are yet untested.
121117

122118
### Tokenizing Tool
123-
When coding new sniffs it really helps to see what the code looks like in regards of the token arrays.
119+
When coding new sniffs it really helps to see what the code looks like in regard to the token arrays.
124120
So we can parse a PHP file into its tokens using the following tool:
125121

126122
```

0 commit comments

Comments
 (0)