From a6daa05b1160873a661f28eee8d3937299564569 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Wed, 12 May 2021 06:04:19 +0200 Subject: [PATCH] Sniff test: adjust two test files to match This removes two expected errors due to the tokenizer change made in the previous commit. ### `Generic.Arrays.DisallowLongArraySyntax` The code on line 13 is a parse error, so the sniff no longer throwing an error for it should not be our concern. ```php $var = array; ``` ### `Squiz.PHP.CommentedOutCode` The code which triggered the warning on line 35 was a docblock written as a block comment and not really commented out code anyway, so this could be considered a fix for a false positive. ```php /* * The listeners array. * * @var array(PHP_CodeSniffer_Sniff) */ ``` --- .../Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.php | 1 - src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.php | 1 - 2 files changed, 2 deletions(-) diff --git a/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.php b/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.php index 0297681061..af1d9c9a86 100644 --- a/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.php +++ b/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.php @@ -35,7 +35,6 @@ public function getErrorList($testFile='') 6 => 1, 7 => 1, 12 => 1, - 13 => 1, ]; case 'DisallowLongArraySyntaxUnitTest.2.inc': return [ diff --git a/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.php b/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.php index d51f23ca3b..36c556d8c2 100644 --- a/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.php +++ b/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.php @@ -49,7 +49,6 @@ public function getWarningList($testFile='CommentedOutCodeUnitTest.inc') 8 => 1, 15 => 1, 19 => 1, - 35 => 1, 87 => 1, 91 => 1, 97 => 1,