From cb86578e2d34169c4689b0cd562024be0b5a2ee3 Mon Sep 17 00:00:00 2001 From: Richardas Kuchinskas Date: Wed, 6 Mar 2024 19:40:17 +0300 Subject: [PATCH] formatting fix --- example/custom/custom_test.go | 2 +- src/linter/quickfix.go | 2 +- src/linter/report.go | 6 +- src/tests/checkers/anon_class_test.go | 14 +- src/tests/checkers/arrow_functions_test.go | 4 +- src/tests/checkers/basic_test.go | 198 +++++++++--------- src/tests/checkers/catch_test.go | 20 +- src/tests/checkers/closure_test.go | 6 +- src/tests/checkers/codedup_test.go | 14 +- src/tests/checkers/deprecated_test.go | 4 +- src/tests/checkers/disable_inspection_test.go | 2 +- src/tests/checkers/discard_expr_test.go | 8 +- src/tests/checkers/emptystmt_test.go | 14 +- src/tests/checkers/function_exists_test.go | 6 +- src/tests/checkers/get_type_miss_use_test.go | 2 +- src/tests/checkers/indexing_order_test.go | 12 +- src/tests/checkers/kphp_test.go | 4 +- src/tests/checkers/linter_suppress_test.go | 14 +- src/tests/checkers/literal_type_test.go | 2 +- src/tests/checkers/misspell_test.go | 8 +- src/tests/checkers/oop_test.go | 78 +++---- src/tests/checkers/paramClobber_test.go | 12 +- src/tests/checkers/phpdoc_test.go | 26 +-- src/tests/checkers/printf_test.go | 4 +- src/tests/checkers/regexpsimplify_test.go | 10 +- src/tests/checkers/regexpvet_test.go | 6 +- src/tests/checkers/relative_name_test.go | 6 +- src/tests/checkers/shape_test.go | 12 +- src/tests/checkers/strict_mixed_test.go | 4 +- src/tests/checkers/stripTags_test.go | 8 +- src/tests/checkers/trait_test.go | 2 +- src/tests/checkers/trigger_error_test.go | 10 +- src/tests/checkers/typehint_test.go | 2 +- .../Inflector/CachedWordInflector.php | 2 +- .../lib/Doctrine/Inflector/Inflector.php | 2 +- .../Doctrine/Inflector/InflectorFactory.php | 2 +- .../lib/Doctrine/Inflector/Language.php | 2 +- .../Doctrine/Inflector/NoopWordInflector.php | 2 +- .../Inflector/Rules/English/Inflectible.php | 2 +- .../Rules/English/InflectorFactory.php | 2 +- .../Inflector/Rules/English/Rules.php | 2 +- .../Inflector/Rules/English/Uninflected.php | 2 +- .../Inflector/Rules/French/Inflectible.php | 2 +- .../Rules/French/InflectorFactory.php | 2 +- .../Doctrine/Inflector/Rules/French/Rules.php | 2 +- .../Inflector/Rules/French/Uninflected.php | 2 +- .../Rules/NorwegianBokmal/Inflectible.php | 2 +- .../NorwegianBokmal/InflectorFactory.php | 2 +- .../Inflector/Rules/NorwegianBokmal/Rules.php | 2 +- .../Rules/NorwegianBokmal/Uninflected.php | 2 +- .../lib/Doctrine/Inflector/Rules/Pattern.php | 2 +- .../lib/Doctrine/Inflector/Rules/Patterns.php | 2 +- .../Rules/Portuguese/Inflectible.php | 2 +- .../Rules/Portuguese/InflectorFactory.php | 2 +- .../Inflector/Rules/Portuguese/Rules.php | 2 +- .../Rules/Portuguese/Uninflected.php | 2 +- .../lib/Doctrine/Inflector/Rules/Ruleset.php | 2 +- .../Inflector/Rules/Spanish/Inflectible.php | 2 +- .../Rules/Spanish/InflectorFactory.php | 2 +- .../Inflector/Rules/Spanish/Rules.php | 2 +- .../Inflector/Rules/Spanish/Uninflected.php | 2 +- .../Doctrine/Inflector/Rules/Substitution.php | 2 +- .../Inflector/Rules/Substitutions.php | 2 +- .../Inflector/Rules/Transformation.php | 2 +- .../Inflector/Rules/Transformations.php | 2 +- .../Inflector/Rules/Turkish/Inflectible.php | 2 +- .../Rules/Turkish/InflectorFactory.php | 2 +- .../Inflector/Rules/Turkish/Rules.php | 2 +- .../Inflector/Rules/Turkish/Uninflected.php | 2 +- .../lib/Doctrine/Inflector/Rules/Word.php | 2 +- .../Doctrine/Inflector/RulesetInflector.php | 2 +- .../lib/Doctrine/Inflector/WordInflector.php | 2 +- .../golden/testdata/math/src/BigDecimal.php | 2 +- .../golden/testdata/math/src/BigInteger.php | 2 +- .../golden/testdata/math/src/BigNumber.php | 2 +- .../golden/testdata/math/src/BigRational.php | 2 +- .../src/Exception/DivisionByZeroException.php | 2 +- .../Exception/IntegerOverflowException.php | 2 +- .../math/src/Exception/MathException.php | 2 +- .../src/Exception/NegativeNumberException.php | 2 +- .../src/Exception/NumberFormatException.php | 2 +- .../Exception/RoundingNecessaryException.php | 2 +- .../testdata/math/src/Internal/Calculator.php | 2 +- .../Internal/Calculator/BcMathCalculator.php | 2 +- .../src/Internal/Calculator/GmpCalculator.php | 2 +- .../Internal/Calculator/NativeCalculator.php | 2 +- .../golden/testdata/math/src/RoundingMode.php | 2 +- .../quickfix/arraySyntax.php.fix.expected | 2 +- .../quickfix/binaryOp.php.fix.expected | 2 +- .../quickfix/callSimplify.php.fix.expected | 2 +- .../quickfix/complexExamples.php.fix.expected | 2 +- .../quickfix/constCase.php.fix.expected | 2 +- .../testdata/quickfix/declareStrictTypes.php | 2 +- .../declareStrictTypes.php.fix.expected | 2 +- .../quickfix/getTypeMisUse.php.fix.expected | 2 +- .../quickfix/indexingSyntax.php.fix.expected | 2 +- ...clareStrictTypesSection_1.php.fix.expected | 2 +- .../noDeclareStrictTypesSection_2.php | 2 +- ...clareStrictTypesSection_2.php.fix.expected | 4 +- .../quickfix/propNullDefault.php.fix.expected | 2 +- .../quickfix/ternarySimplify.php.fix.expected | 2 +- .../quickfix/trailingComma.php.fix.expected | 2 +- .../quickfix/unaryRepeat.php.fix.expected | 2 +- .../php8/deprecated_annotation_any.php | 2 +- .../testdata/php8/param_available_any.php | 2 +- .../testdata/php8/propertyPromotion_any.php | 2 +- src/tests/regression/issue1071_test.go | 2 +- src/tests/regression/issue11_test.go | 2 +- src/tests/regression/issue128_test.go | 2 +- src/tests/regression/issue16_test.go | 2 +- src/tests/regression/issue170_test.go | 2 +- src/tests/regression/issue182_test.go | 2 +- src/tests/regression/issue183_test.go | 2 +- src/tests/regression/issue1_test.go | 2 +- src/tests/regression/issue209_test.go | 4 +- src/tests/regression/issue252_test.go | 4 +- src/tests/regression/issue26_test.go | 8 +- src/tests/regression/issue283_test.go | 2 +- src/tests/regression/issue288_test.go | 2 +- src/tests/regression/issue289_test.go | 2 +- src/tests/regression/issue2_test.go | 2 +- src/tests/regression/issue327_test.go | 2 +- src/tests/regression/issue362_test.go | 4 +- src/tests/regression/issue375_test.go | 2 +- src/tests/regression/issue37_test.go | 2 +- src/tests/regression/issue387_test.go | 2 +- src/tests/regression/issue390_test.go | 2 +- src/tests/regression/issue3_test.go | 2 +- src/tests/regression/issue497_test.go | 2 +- src/tests/regression/issue547_test.go | 2 +- src/tests/regression/issue548_test.go | 10 +- src/tests/regression/issue556_test.go | 2 +- src/tests/regression/issue673_test.go | 2 +- src/tests/regression/issue6_test.go | 4 +- src/tests/regression/issue778_test.go | 2 +- src/tests/regression/issue78_test.go | 6 +- src/tests/regression/issue8_test.go | 2 +- src/tests/regression/issue989_test.go | 8 +- src/tests/regression/pull236_test.go | 2 +- 139 files changed, 384 insertions(+), 384 deletions(-) diff --git a/example/custom/custom_test.go b/example/custom/custom_test.go index 08c601c93..3b2e5e41b 100644 --- a/example/custom/custom_test.go +++ b/example/custom/custom_test.go @@ -11,7 +11,7 @@ func TestAssignmentAsExpression(t *testing.T) { addCheckers(test.Config()) test.AddFile(`func2()->func3(); func TestAnonClassWithConstructor(t *testing.T) { linttest.SimpleNegativeTest(t, ` $v) { $_ = [$k, $v]; @@ -188,7 +188,7 @@ $_ = [$x]; // Bad func TestForeachSimplify(t *testing.T) { test := linttest.NewSuite(t) test.AddFile(` $y]; } @@ -613,7 +613,7 @@ foreach ([[1, 2, 3, 4]] as list($x, $y,,$z)) { func TestArgsCount(t *testing.T) { test := linttest.NewSuite(t) test.AddFile(` 1, "\xa" => 2]; `) test.Expect = []string{`Duplicate array key "\n"`} @@ -1386,7 +1386,7 @@ $_ = ["\n" => 1, "\xa" => 2]; func TestDuplicateArrayKeyGood(t *testing.T) { linttest.SimpleNegativeTest(t, ` 1, "'" => 1, @@ -1397,7 +1397,7 @@ $valid_quotes = [ func TestDuplicateArrayKey(t *testing.T) { test := linttest.NewSuite(t) test.AddFile(` 'something', @@ -1413,7 +1413,7 @@ function test() { func TestDuplicateArrayKeyWithBoolConstants(t *testing.T) { test := linttest.NewSuite(t) test.AddFile(` 1, true => 2]; func TestDuplicateArrayKeyWithConstants(t *testing.T) { test := linttest.NewSuite(t) test.AddFile(`loadHTML('field = $x; } @@ -46,7 +46,7 @@ echo $v->field; func TestIndexingOrderTraits(t *testing.T) { test := linttest.NewSuite(t) test.AddNamedFile("/foo/A.php", `field = $x; } @@ -80,13 +80,13 @@ echo $v->field; func TestIndexingOrderFuncs(t *testing.T) { test := linttest.NewSuite(t) test.AddNamedFile("/foo/A.php", `acceptThis($foo); func TestMagicGetChaining(t *testing.T) { linttest.SimpleNegativeTest(t, `foo->bar->method(); func TestNonPublicMagicMethods(t *testing.T) { test := linttest.NewSuite(t) test.AddFile(`create() as $item) { func TestDerivedLateStaticBinding(t *testing.T) { linttest.SimpleNegativeTest(t, `onlyInDerived(); func TestStaticResolutionInsideSameClass(t *testing.T) { test := linttest.NewSuite(t) test.AddFile(`name(); @@ -1030,7 +1030,7 @@ function fn4($f4) { func TestInstanceOfElseif1(t *testing.T) { linttest.SimpleNegativeTest(t, `[0-9])~', $s); preg_match('~(?[0-9])~', $s); @@ -28,7 +28,7 @@ func TestRESimplifyMixed(t *testing.T) { test := linttest.NewSuite(t) test.LoadStubs = []string{`stubs/phpstorm-stubs/pcre/pcre.php`} test.AddFile(` x function ungroup($s) { preg_match('/(?:x)/', $s); @@ -149,7 +149,7 @@ func TestRESimplifyChangeDelim(t *testing.T) { test := linttest.NewSuite(t) test.LoadStubs = []string{`stubs/phpstorm-stubs/pcre/pcre.php`} test.AddFile(`good6['y']->value; func TestShapeReturn(t *testing.T) { linttest.SimpleNegativeTest(t, `next->next; func TestTuple(t *testing.T) { linttest.SimpleNegativeTest(t, `', 'a', 'A']); } @@ -42,7 +42,7 @@ func TestStripTagsString1(t *testing.T) { test := linttest.NewSuite(t) test.LoadStubs = []string{"stubs/phpstorm-stubs/standard/standard_1.php"} test.AddFile(`'); } @@ -61,7 +61,7 @@ func TestStripTagsString2(t *testing.T) { test := linttest.NewSuite(t) test.LoadStubs = []string{"stubs/phpstorm-stubs/standard/standard_1.php"} test.AddFile(`

'); } diff --git a/src/tests/checkers/trait_test.go b/src/tests/checkers/trait_test.go index 0b2664391..167d820bf 100644 --- a/src/tests/checkers/trait_test.go +++ b/src/tests/checkers/trait_test.go @@ -9,7 +9,7 @@ import ( func TestTraitSingleton(t *testing.T) { // See #533. linttest.SimpleNegativeTest(t, ` 1, 'b' => 2, 'c' => 3]; if (array_key_exists('z', $array)) { // 2 diff --git a/src/tests/golden/testdata/quickfix/complexExamples.php.fix.expected b/src/tests/golden/testdata/quickfix/complexExamples.php.fix.expected index 15e87f4c4..3ed4c9e56 100644 --- a/src/tests/golden/testdata/quickfix/complexExamples.php.fix.expected +++ b/src/tests/golden/testdata/quickfix/complexExamples.php.fix.expected @@ -1,6 +1,6 @@ sum(); // actual PHP prints 6 func TestIssue209_2(t *testing.T) { test := linttest.NewSuite(t) test.AddFile(` 1, "\n" => 2]; `) } diff --git a/src/tests/regression/issue6_test.go b/src/tests/regression/issue6_test.go index e077b8f88..128505fae 100644 --- a/src/tests/regression/issue6_test.go +++ b/src/tests/regression/issue6_test.go @@ -8,8 +8,8 @@ import ( func TestIssue6(t *testing.T) { linttest.SimpleNegativeTest(t, `