File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -32,11 +32,16 @@ also use them standalone/separately in any way you like.
32
32
- PSR2R.Methods.MethodArgumentDefaultValue
33
33
- PSR2R.PHP.RemoveFunctionAlias
34
34
- PSR2R.PHP.ShortCast
35
- - PSR2R.PHP.NoSpacesCast
36
35
- PSR2R.PHP.NoIsNull
37
36
- PSR2R.PHP.PreferCastOverFunction
38
37
- PSR2R.PHP.PhpSapiConstant
38
+ - PSR2R.Whitespace.CastSpacing
39
39
- PSR2R.Whitespace.WhitespaceAfterReturn
40
+ - PSR2R.Whitespace.ConcatenationSpacing
41
+ - PSR2R.Whitespace.CommaSpacing
42
+ - PSR2R.Whitespace.OperatorSpacing
43
+ - PSR2R.Whitespace.ObjectAttributeSpacing
44
+ - PSR2R.Whitespace.LanguageConstructSpacing
40
45
- And some more inherited ruleset sniffers (> 20).
41
46
42
47
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/
68
73
You can easily write new sniffers and run them isolated over test files.
69
74
It helps to use ` -s ` to see the names of the sniffers that reported issues.
70
75
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
+
71
79
### Tokenizing Tool
72
80
It really helps to see what the code looks like for the sniffer.
73
81
So we can parse a PHP file into its tokens using the following tool:
You can’t perform that action at this time.
0 commit comments