File tree 3 files changed +7
-4
lines changed
tests/Integration/Fixtures
3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 125
125
use PhpCsFixer \Fixer \Semicolon \NoSinglelineWhitespaceBeforeSemicolonsFixer ;
126
126
use PhpCsFixer \Fixer \Semicolon \SpaceAfterSemicolonFixer ;
127
127
use PhpCsFixer \Fixer \Strict \DeclareStrictTypesFixer ;
128
+ use PhpCsFixer \Fixer \Strict \StrictComparisonFixer ;
128
129
use PhpCsFixer \Fixer \Strict \StrictParamFixer ;
129
130
use PhpCsFixer \Fixer \StringNotation \SingleQuoteFixer ;
130
131
use PhpCsFixer \Fixer \Whitespace \BlankLineBeforeStatementFixer ;
365
366
DeclareStrictTypesFixer::class,
366
367
// Functions should be used with `$strict` param set to `true`
367
368
StrictParamFixer::class,
369
+ // Comparisons should be strict, `===` or `!==` must be used for comparisons
370
+ StrictComparisonFixer::class,
368
371
// Convert double quotes to single quotes for simple strings
369
372
SingleQuoteFixer::class,
370
373
// Remove extra spaces in a nullable typehint
Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ class Basic
14
14
$ lambdaWithUnusedImport = function () { return 'foo ' ; };
15
15
// NoUselessSprintfFixer
16
16
$ uselessSprintf = 'bar ' ;
17
- // SingleSpaceAfterConstructFixer
18
- if ($ a == $ b ) {
17
+ // SingleSpaceAfterConstructFixer, StrictComparisonFixer
18
+ if ($ a === $ b || $ bazLength !== 3 ) {
19
19
return true ;
20
20
}
21
21
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ class Basic
13
13
$ lambdaWithUnusedImport = function () use ($ fooBar ) { return 'foo ' ; };
14
14
// NoUselessSprintfFixer
15
15
$ uselessSprintf = sprintf ('bar ' );
16
- // SingleSpaceAfterConstructFixer
17
- if ($ a == $ b ) { return true ; }
16
+ // SingleSpaceAfterConstructFixer, StrictComparisonFixer
17
+ if ($ a == $ b || $ bazLength != 3 ) { return true ; }
18
18
return false ; // BlankLineBeforeStatementFixer
19
19
}
20
20
You can’t perform that action at this time.
0 commit comments