@@ -552,15 +552,15 @@ public function testCompactWarningsHaveCorrectSniffCodes()
552
552
$ phpcsFile ->process ();
553
553
554
554
$ warnings = $ phpcsFile ->getWarnings ();
555
- $ this ->assertSame (' VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable ' , $ warnings [2 ][49 ][0 ]['source ' ]);
556
- $ this ->assertSame (' VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable ' , $ warnings [7 ][23 ][0 ]['source ' ]);
557
- $ this ->assertSame (' VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable ' , $ warnings [10 ][54 ][0 ]['source ' ]);
558
- $ this ->assertSame (' VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable ' , $ warnings [14 ][52 ][0 ]['source ' ]);
559
- $ this ->assertSame (' VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable ' , $ warnings [19 ][5 ][0 ]['source ' ]);
560
- $ this ->assertSame (' VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable ' , $ warnings [23 ][23 ][0 ]['source ' ]);
561
- $ this ->assertSame (' VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable ' , $ warnings [26 ][66 ][0 ]['source ' ]);
562
- $ this ->assertSame (' VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable ' , $ warnings [36 ][5 ][0 ]['source ' ]);
563
- $ this ->assertSame (' VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable ' , $ warnings [36 ][23 ][0 ]['source ' ]);
555
+ $ this ->assertSame (self :: UNUSED_ERROR_CODE , $ warnings [2 ][49 ][0 ]['source ' ]);
556
+ $ this ->assertSame (self :: UNDEFINED_ERROR_CODE , $ warnings [7 ][23 ][0 ]['source ' ]);
557
+ $ this ->assertSame (self :: UNDEFINED_ERROR_CODE , $ warnings [10 ][54 ][0 ]['source ' ]);
558
+ $ this ->assertSame (self :: UNUSED_ERROR_CODE , $ warnings [14 ][52 ][0 ]['source ' ]);
559
+ $ this ->assertSame (self :: UNUSED_ERROR_CODE , $ warnings [19 ][5 ][0 ]['source ' ]);
560
+ $ this ->assertSame (self :: UNDEFINED_ERROR_CODE , $ warnings [23 ][23 ][0 ]['source ' ]);
561
+ $ this ->assertSame (self :: UNDEFINED_ERROR_CODE , $ warnings [26 ][66 ][0 ]['source ' ]);
562
+ $ this ->assertSame (self :: UNUSED_ERROR_CODE , $ warnings [36 ][5 ][0 ]['source ' ]);
563
+ $ this ->assertSame (self :: UNDEFINED_ERROR_CODE , $ warnings [36 ][23 ][0 ]['source ' ]);
564
564
}
565
565
566
566
public function testTraitAllowsThis ()
@@ -696,13 +696,13 @@ public function testUnusedParamsHaveCorrectSniffCodes()
696
696
$ phpcsFile ->process ();
697
697
698
698
$ warnings = $ phpcsFile ->getWarnings ();
699
- $ this ->assertSame (' VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable ' , $ warnings [4 ][43 ][0 ]['source ' ]);
700
- $ this ->assertSame (' VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable ' , $ warnings [16 ][52 ][0 ]['source ' ]);
701
- $ this ->assertSame (' VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable ' , $ warnings [27 ][60 ][0 ]['source ' ]);
702
- $ this ->assertSame (' VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable ' , $ warnings [39 ][42 ][0 ]['source ' ]);
703
- $ this ->assertSame (' VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable ' , $ warnings [39 ][51 ][0 ]['source ' ]);
704
- $ this ->assertSame (' VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable ' , $ warnings [72 ][5 ][0 ]['source ' ]);
705
- $ this ->assertSame (' VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable ' , $ warnings [73 ][5 ][0 ]['source ' ]);
699
+ $ this ->assertSame (self :: UNUSED_ERROR_CODE , $ warnings [4 ][43 ][0 ]['source ' ]);
700
+ $ this ->assertSame (self :: UNUSED_ERROR_CODE , $ warnings [16 ][52 ][0 ]['source ' ]);
701
+ $ this ->assertSame (self :: UNUSED_ERROR_CODE , $ warnings [27 ][60 ][0 ]['source ' ]);
702
+ $ this ->assertSame (self :: UNUSED_ERROR_CODE , $ warnings [39 ][42 ][0 ]['source ' ]);
703
+ $ this ->assertSame (self :: UNUSED_ERROR_CODE , $ warnings [39 ][51 ][0 ]['source ' ]);
704
+ $ this ->assertSame (self :: UNUSED_ERROR_CODE , $ warnings [72 ][5 ][0 ]['source ' ]);
705
+ $ this ->assertSame (self :: UNUSED_ERROR_CODE , $ warnings [73 ][5 ][0 ]['source ' ]);
706
706
}
707
707
708
708
public function testValidUnusedVariableNamesIgnoresUnusedVariables ()
0 commit comments