Skip to content

Commit 5df58c9

Browse files
author
Mark Scherer
committed
Docs
1 parent 115c301 commit 5df58c9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,16 @@ also use them standalone/separately in any way you like.
3232
- PSR2R.Methods.MethodArgumentDefaultValue
3333
- PSR2R.PHP.RemoveFunctionAlias
3434
- PSR2R.PHP.ShortCast
35-
- PSR2R.PHP.NoSpacesCast
3635
- PSR2R.PHP.NoIsNull
3736
- PSR2R.PHP.PreferCastOverFunction
3837
- PSR2R.PHP.PhpSapiConstant
38+
- PSR2R.Whitespace.CastSpacing
3939
- PSR2R.Whitespace.WhitespaceAfterReturn
40+
- PSR2R.Whitespace.ConcatenationSpacing
41+
- PSR2R.Whitespace.CommaSpacing
42+
- PSR2R.Whitespace.OperatorSpacing
43+
- PSR2R.Whitespace.ObjectAttributeSpacing
44+
- PSR2R.Whitespace.LanguageConstructSpacing
4045
- And some more inherited ruleset sniffers (> 20).
4146

4247
Most of the sniffers also provide auto-fixing using `-f` option where it is possible.
@@ -68,6 +73,9 @@ vendor/bin/phpcs --standard=vendor/fig-r/psr2r-sniffer/PSR2R/ruleset.xml src/
6873
You can easily write new sniffers and run them isolated over test files.
6974
It helps to use `-s` to see the names of the sniffers that reported issues.
7075

76+
For testing fixing, it can sometimes help to use `--suffix=fixed.php` etc to write to a different file.
77+
This way you can check the output of this second file without the actual one being changed.
78+
7179
### Tokenizing Tool
7280
It really helps to see what the code looks like for the sniffer.
7381
So we can parse a PHP file into its tokens using the following tool:

0 commit comments

Comments
 (0)