-
Notifications
You must be signed in to change notification settings - Fork 8
Home
Mark Scherer edited this page Jan 2, 2023
·
9 revisions
CS Sniffer version | branch | PHP min |
---|---|---|
0.x | - [EOL] | PHP 5.6 |
1.x | master | PHP 7.3 |
2.x | next | PHP 8.1 |
-
empty($var) === true
=>empty($var)
-
isset($var) === false
=>!isset($var)
-
list(, , , , $x) - 1 space for empty list element
-
Always operator at beginning of line:
$a = 'b' .
$c;
// to
$a = 'b'
. $c;
- Make all sniffers except for "toTabs" ones indentation agnostic, they should work with both indentation chars (single tab vs 4 spaces) They detect the indentation to be used by the existing ones around the line that needs fixing.