@@ -391,12 +391,24 @@ public static function dataSuppressLine()
391
391
],
392
392
393
393
// With suppression on line before.
394
- 'ignore: line before, slash comment ' => ['before ' => '// phpcs:ignore ' ],
395
- 'ignore: line before, slash comment, with @ ' => ['before ' => '// @phpcs:ignore ' ],
396
- 'ignore: line before, hash comment ' => ['before ' => '# phpcs:ignore ' ],
397
- 'ignore: line before, hash comment, with @ ' => ['before ' => '# @phpcs:ignore ' ],
398
- 'ignore: line before, star comment ' => ['before ' => '/* phpcs:ignore */ ' ],
399
- 'ignore: line before, star comment, with @ ' => ['before ' => '/* @phpcs:ignore */ ' ],
394
+ 'ignore: line before, slash comment ' => [
395
+ 'before ' => '// phpcs:ignore ' ,
396
+ ],
397
+ 'ignore: line before, slash comment, with @ ' => [
398
+ 'before ' => '// @phpcs:ignore ' ,
399
+ ],
400
+ 'ignore: line before, hash comment ' => [
401
+ 'before ' => '# phpcs:ignore ' ,
402
+ ],
403
+ 'ignore: line before, hash comment, with @ ' => [
404
+ 'before ' => '# @phpcs:ignore ' ,
405
+ ],
406
+ 'ignore: line before, star comment ' => [
407
+ 'before ' => '/* phpcs:ignore */ ' ,
408
+ ],
409
+ 'ignore: line before, star comment, with @ ' => [
410
+ 'before ' => '/* @phpcs:ignore */ ' ,
411
+ ],
400
412
401
413
// With suppression as trailing comment on code line.
402
414
'ignore: end of line, slash comment ' => [
@@ -417,7 +429,9 @@ public static function dataSuppressLine()
417
429
],
418
430
419
431
// Deprecated syntax.
420
- 'old style: line before, slash comment ' => ['before ' => '// @codingStandardsIgnoreLine ' ],
432
+ 'old style: line before, slash comment ' => [
433
+ 'before ' => '// @codingStandardsIgnoreLine ' ,
434
+ ],
421
435
'old style: end of line, slash comment ' => [
422
436
'before ' => '' ,
423
437
'after ' => ' // @codingStandardsIgnoreLine ' ,
@@ -732,16 +746,30 @@ public static function dataSuppressFile()
732
746
],
733
747
734
748
// Process with suppression.
735
- 'ignoreFile: start of file, slash comment ' => ['before ' => '// phpcs:ignoreFile ' ],
736
- 'ignoreFile: start of file, slash comment, with @ ' => ['before ' => '// @phpcs:ignoreFile ' ],
737
- 'ignoreFile: start of file, slash comment, mixed case ' => ['before ' => '// PHPCS:Ignorefile ' ],
738
- 'ignoreFile: start of file, hash comment ' => ['before ' => '# phpcs:ignoreFile ' ],
739
- 'ignoreFile: start of file, hash comment, with @ ' => ['before ' => '# @phpcs:ignoreFile ' ],
740
- 'ignoreFile: start of file, single-line star comment ' => ['before ' => '/* phpcs:ignoreFile */ ' ],
749
+ 'ignoreFile: start of file, slash comment ' => [
750
+ 'before ' => '// phpcs:ignoreFile ' ,
751
+ ],
752
+ 'ignoreFile: start of file, slash comment, with @ ' => [
753
+ 'before ' => '// @phpcs:ignoreFile ' ,
754
+ ],
755
+ 'ignoreFile: start of file, slash comment, mixed case ' => [
756
+ 'before ' => '// PHPCS:Ignorefile ' ,
757
+ ],
758
+ 'ignoreFile: start of file, hash comment ' => [
759
+ 'before ' => '# phpcs:ignoreFile ' ,
760
+ ],
761
+ 'ignoreFile: start of file, hash comment, with @ ' => [
762
+ 'before ' => '# @phpcs:ignoreFile ' ,
763
+ ],
764
+ 'ignoreFile: start of file, single-line star comment ' => [
765
+ 'before ' => '/* phpcs:ignoreFile */ ' ,
766
+ ],
741
767
'ignoreFile: start of file, multi-line star comment ' => [
742
768
'before ' => '/* ' .PHP_EOL .' phpcs:ignoreFile ' .PHP_EOL .' */ ' ,
743
769
],
744
- 'ignoreFile: start of file, single-line docblock comment ' => ['before ' => '/** phpcs:ignoreFile */ ' ],
770
+ 'ignoreFile: start of file, single-line docblock comment ' => [
771
+ 'before ' => '/** phpcs:ignoreFile */ ' ,
772
+ ],
745
773
746
774
// Process late comment.
747
775
'ignoreFile: late comment, slash comment ' => [
@@ -750,12 +778,18 @@ public static function dataSuppressFile()
750
778
],
751
779
752
780
// Deprecated syntax.
753
- 'old style: start of file, slash comment ' => ['before ' => '// @codingStandardsIgnoreFile ' ],
754
- 'old style: start of file, single-line star comment ' => ['before ' => '/* @codingStandardsIgnoreFile */ ' ],
781
+ 'old style: start of file, slash comment ' => [
782
+ 'before ' => '// @codingStandardsIgnoreFile ' ,
783
+ ],
784
+ 'old style: start of file, single-line star comment ' => [
785
+ 'before ' => '/* @codingStandardsIgnoreFile */ ' ,
786
+ ],
755
787
'old style: start of file, multi-line star comment ' => [
756
788
'before ' => '/* ' .PHP_EOL .' @codingStandardsIgnoreFile ' .PHP_EOL .' */ ' ,
757
789
],
758
- 'old style: start of file, single-line docblock comment ' => ['before ' => '/** @codingStandardsIgnoreFile */ ' ],
790
+ 'old style: start of file, single-line docblock comment ' => [
791
+ 'before ' => '/** @codingStandardsIgnoreFile */ ' ,
792
+ ],
759
793
760
794
// Deprecated syntax, late comment.
761
795
'old style: late comment, slash comment ' => [
@@ -843,7 +877,9 @@ public static function dataDisableSelected()
843
877
],
844
878
845
879
// Multiple sniffs.
846
- 'disable: multiple sniffs in one comment ' => ['before ' => '// phpcs:disable Generic.Commenting.Todo,Generic.PHP.LowerCaseConstant ' ],
880
+ 'disable: multiple sniffs in one comment ' => [
881
+ 'before ' => '// phpcs:disable Generic.Commenting.Todo,Generic.PHP.LowerCaseConstant ' ,
882
+ ],
847
883
'disable: multiple sniff in multiple comments ' => [
848
884
'before ' => '// phpcs:disable Generic.Commenting.Todo ' .PHP_EOL .'// phpcs:disable Generic.PHP.LowerCaseConstant ' ,
849
885
],
@@ -853,12 +889,16 @@ public static function dataDisableSelected()
853
889
'before ' => '// phpcs:disable Generic.Commenting ' ,
854
890
'expectedErrors ' => 1 ,
855
891
],
856
- 'disable: whole standard ' => ['before ' => '// phpcs:disable Generic ' ],
892
+ 'disable: whole standard ' => [
893
+ 'before ' => '// phpcs:disable Generic ' ,
894
+ ],
857
895
'disable: single errorcode ' => [
858
896
'before ' => '# @phpcs:disable Generic.Commenting.Todo.TaskFound ' ,
859
897
'expectedErrors ' => 1 ,
860
898
],
861
- 'disable: single errorcode and a category ' => ['before ' => '// phpcs:disable Generic.PHP.LowerCaseConstant.Found,Generic.Commenting ' ],
899
+ 'disable: single errorcode and a category ' => [
900
+ 'before ' => '// phpcs:disable Generic.PHP.LowerCaseConstant.Found,Generic.Commenting ' ,
901
+ ],
862
902
863
903
// Wrong category/sniff/code.
864
904
'disable: wrong error code and category ' => [
0 commit comments