@@ -510,15 +510,15 @@ public static function dataNestedSuppressLine()
510
510
511
511
// Process with line suppression nested within disable/enable suppression.
512
512
'disable/enable: slash comment, next line nested single line suppression ' => [
513
- 'before ' => ' // phpcs:disable ' . PHP_EOL . ' // phpcs:ignore ' ,
513
+ 'before ' => " // phpcs:disable \n // phpcs:ignore " ,
514
514
'after ' => '// phpcs:enable ' ,
515
515
],
516
516
'disable/enable: slash comment, with @, next line nested single line suppression ' => [
517
- 'before ' => ' // @phpcs:disable ' . PHP_EOL . ' // @phpcs:ignore ' ,
517
+ 'before ' => " // @phpcs:disable \n // @phpcs:ignore " ,
518
518
'after ' => '// @phpcs:enable ' ,
519
519
],
520
520
'disable/enable: hash comment, next line nested single line suppression ' => [
521
- 'before ' => ' # @phpcs:disable ' . PHP_EOL . ' # @phpcs:ignore ' ,
521
+ 'before ' => " # @phpcs:disable \n # @phpcs:ignore " ,
522
522
'after ' => '# @phpcs:enable ' ,
523
523
],
524
524
];
@@ -689,7 +689,7 @@ public static function dataSuppressFile()
689
689
'before ' => '/* phpcs:ignoreFile */ ' ,
690
690
],
691
691
'ignoreFile: start of file, multi-line star comment ' => [
692
- 'before ' => ' /* ' . PHP_EOL . ' phpcs:ignoreFile ' . PHP_EOL . ' */ ' ,
692
+ 'before ' => " /* \n phpcs:ignoreFile \n */ " ,
693
693
],
694
694
'ignoreFile: start of file, single-line docblock comment ' => [
695
695
'before ' => '/** phpcs:ignoreFile */ ' ,
@@ -771,11 +771,11 @@ public static function dataDisableSelected()
771
771
'expectedErrors ' => 1 ,
772
772
],
773
773
'disable: single sniff, docblock ' => [
774
- 'before ' => ' /** ' . PHP_EOL . ' * phpcs:disable Generic.Commenting.Todo ' . PHP_EOL . ' */ ' ,
774
+ 'before ' => " /** \n * phpcs:disable Generic.Commenting.Todo \n */ " ,
775
775
'expectedErrors ' => 1 ,
776
776
],
777
777
'disable: single sniff, docblock, with @ ' => [
778
- 'before ' => ' /** ' . PHP_EOL . ' * @phpcs:disable Generic.Commenting.Todo ' . PHP_EOL . ' */ ' ,
778
+ 'before ' => " /** \n * @phpcs:disable Generic.Commenting.Todo \n */ " ,
779
779
'expectedErrors ' => 1 ,
780
780
],
781
781
@@ -784,7 +784,7 @@ public static function dataDisableSelected()
784
784
'before ' => '// phpcs:disable Generic.Commenting.Todo,Generic.PHP.LowerCaseConstant ' ,
785
785
],
786
786
'disable: multiple sniff in multiple comments ' => [
787
- 'before ' => ' // phpcs:disable Generic.Commenting.Todo ' . PHP_EOL . ' // phpcs:disable Generic.PHP.LowerCaseConstant ' ,
787
+ 'before ' => " // phpcs:disable Generic.Commenting.Todo \n // phpcs:disable Generic.PHP.LowerCaseConstant " ,
788
788
],
789
789
790
790
// Selectiveness variations.
@@ -805,17 +805,17 @@ public static function dataDisableSelected()
805
805
806
806
// Wrong category/sniff/code.
807
807
'disable: wrong error code and category ' => [
808
- 'before ' => ' /** ' . PHP_EOL . ' * phpcs:disable Generic.PHP.LowerCaseConstant.Upper,Generic.Comments ' . PHP_EOL . ' */ ' ,
808
+ 'before ' => " /** \n * phpcs:disable Generic.PHP.LowerCaseConstant.Upper,Generic.Comments \n */ " ,
809
809
'expectedErrors ' => 1 ,
810
810
'expectedWarnings ' => 1 ,
811
811
],
812
812
'disable: wrong category, docblock ' => [
813
- 'before ' => ' /** ' . PHP_EOL . ' * phpcs:disable Generic.Files ' . PHP_EOL . ' */ ' ,
813
+ 'before ' => " /** \n * phpcs:disable Generic.Files \n */ " ,
814
814
'expectedErrors ' => 1 ,
815
815
'expectedWarnings ' => 1 ,
816
816
],
817
817
'disable: wrong category, docblock, with @ ' => [
818
- 'before ' => ' /** ' . PHP_EOL . ' * @phpcs:disable Generic.Files ' . PHP_EOL . ' */ ' ,
818
+ 'before ' => " /** \n * @phpcs:disable Generic.Files \n */ " ,
819
819
'expectedErrors ' => 1 ,
820
820
'expectedWarnings ' => 1 ,
821
821
],
@@ -1070,7 +1070,7 @@ public static function dataIgnoreSelected()
1070
1070
'expectedWarnings ' => 1 ,
1071
1071
],
1072
1072
'disable: single sniff; ignore: single sniff ' => [
1073
- 'before ' => ' // phpcs:disable Generic.Commenting.Todo ' . PHP_EOL . ' // phpcs:ignore Generic.PHP.LowerCaseConstant ' ,
1073
+ 'before ' => " // phpcs:disable Generic.Commenting.Todo \n // phpcs:ignore Generic.PHP.LowerCaseConstant " ,
1074
1074
'expectedErrors ' => 1 ,
1075
1075
'expectedWarnings ' => 0 ,
1076
1076
],
0 commit comments