From 72a2ee038e3d0832eb82387737f38119d0be06ff Mon Sep 17 00:00:00 2001 From: jrfnl Date: Fri, 12 Jan 2024 00:03:37 +0100 Subject: [PATCH] Tests: make dataproviders `static` As of PHPUnit 10, data providers are (again) expected to be `static` methods. While the test suite does not (yet) support PHPUnit 10, it's still not a bad idea to already start complying with this. --- tests/Core/Config/ReportWidthTest.php | 2 +- tests/Core/ErrorSuppressionTest.php | 22 +++++++++---------- tests/Core/File/FindExtendedClassNameTest.php | 2 +- .../FindImplementedInterfaceNamesTest.php | 2 +- tests/Core/File/GetClassPropertiesTest.php | 4 ++-- tests/Core/File/GetMemberPropertiesTest.php | 4 ++-- tests/Core/File/IsReferenceTest.php | 2 +- tests/Core/Ruleset/RuleInclusionTest.php | 6 ++--- tests/Core/Ruleset/SetSniffPropertyTest.php | 4 ++-- .../AnonClassParenthesisOwnerTest.php | 4 ++-- tests/Core/Tokenizer/ArrayKeywordTest.php | 6 ++--- tests/Core/Tokenizer/AttributesTest.php | 6 ++--- tests/Core/Tokenizer/BackfillEnumTest.php | 4 ++-- .../BackfillExplicitOctalNotationTest.php | 2 +- tests/Core/Tokenizer/BackfillFnTokenTest.php | 4 ++-- .../Core/Tokenizer/BackfillMatchTokenTest.php | 8 +++---- .../BackfillNumericSeparatorTest.php | 4 ++-- tests/Core/Tokenizer/BackfillReadonlyTest.php | 4 ++-- tests/Core/Tokenizer/BitwiseOrTest.php | 4 ++-- .../ContextSensitiveKeywordsTest.php | 4 ++-- tests/Core/Tokenizer/DefaultKeywordTest.php | 6 ++--- tests/Core/Tokenizer/DoubleArrowTest.php | 6 ++--- .../Core/Tokenizer/DoubleQuotedStringTest.php | 2 +- tests/Core/Tokenizer/EnumCaseTest.php | 6 ++--- tests/Core/Tokenizer/FinallyTest.php | 4 ++-- tests/Core/Tokenizer/GotoLabelTest.php | 6 ++--- .../Tokenizer/HeredocNowdocCloserTest.php | 2 +- tests/Core/Tokenizer/HeredocStringTest.php | 2 +- .../NamedFunctionCallArgumentsTest.php | 6 ++--- .../Tokenizer/NullsafeObjectOperatorTest.php | 4 ++-- .../ScopeSettingWithNamespaceOperatorTest.php | 2 +- tests/Core/Tokenizer/ShortArrayTest.php | 4 ++-- .../Tokenizer/StableCommentWhitespaceTest.php | 2 +- .../StableCommentWhitespaceWinTest.php | 2 +- tests/Core/Tokenizer/TypeIntersectionTest.php | 4 ++-- .../UndoNamespacedNameSingleTokenTest.php | 2 +- tests/Core/Util/SuggestTypeTest.php | 6 ++--- 37 files changed, 82 insertions(+), 82 deletions(-) diff --git a/tests/Core/Config/ReportWidthTest.php b/tests/Core/Config/ReportWidthTest.php index c89bf85b2e..3b3881ce01 100644 --- a/tests/Core/Config/ReportWidthTest.php +++ b/tests/Core/Config/ReportWidthTest.php @@ -267,7 +267,7 @@ public function testReportWidthInputHandling($input, $expected) * * @return array */ - public function dataReportWidthInputHandling() + public static function dataReportWidthInputHandling() { return [ 'No value (empty string)' => [ diff --git a/tests/Core/ErrorSuppressionTest.php b/tests/Core/ErrorSuppressionTest.php index e18271a3ef..212cef425a 100644 --- a/tests/Core/ErrorSuppressionTest.php +++ b/tests/Core/ErrorSuppressionTest.php @@ -65,7 +65,7 @@ public function testSuppressError($before, $after, $expectedErrors=0) * * @return array */ - public function dataSuppressError() + public static function dataSuppressError() { return [ 'no suppression' => [ @@ -204,7 +204,7 @@ public function testSuppressSomeErrors($before, $between, $expectedErrors=1) * * @return array */ - public function dataSuppressSomeErrors() + public static function dataSuppressSomeErrors() { return [ 'no suppression' => [ @@ -296,7 +296,7 @@ public function testSuppressWarning($before, $after, $expectedWarnings=0) * * @return array */ - public function dataSuppressWarning() + public static function dataSuppressWarning() { return [ 'no suppression' => [ @@ -381,7 +381,7 @@ public function testSuppressLine($before, $after='', $expectedErrors=1) * * @return array */ - public function dataSuppressLine() + public static function dataSuppressLine() { return [ 'no suppression' => [ @@ -532,7 +532,7 @@ public function testNestedSuppressLine($before, $after) * * @return array */ - public function dataNestedSuppressLine() + public static function dataNestedSuppressLine() { return [ // Process with disable/enable suppression and no single line suppression. @@ -627,7 +627,7 @@ function myFunction() { * * @return array */ - public function dataSuppressScope() + public static function dataSuppressScope() { return [ 'no suppression' => [ @@ -722,7 +722,7 @@ class MyClass {} * * @return array */ - public function dataSuppressFile() + public static function dataSuppressFile() { return [ 'no suppression' => [ @@ -821,7 +821,7 @@ public function testDisableSelected($before, $expectedErrors=0, $expectedWarning * * @return array */ - public function dataDisableSelected() + public static function dataDisableSelected() { return [ // Single sniff. @@ -928,7 +928,7 @@ public function testEnableSelected($code, $expectedErrors, $expectedWarnings) * * @return array */ - public function dataEnableSelected() + public static function dataEnableSelected() { return [ 'disable/enable: a single sniff' => [ @@ -1108,7 +1108,7 @@ public function testIgnoreSelected($before, $expectedErrors, $expectedWarnings) * * @return array */ - public function dataIgnoreSelected() + public static function dataIgnoreSelected() { return [ 'no suppression' => [ @@ -1195,7 +1195,7 @@ public function testCommenting($code, $expectedErrors, $expectedWarnings) * * @return array */ - public function dataCommenting() + public static function dataCommenting() { return [ 'ignore: single sniff' => [ diff --git a/tests/Core/File/FindExtendedClassNameTest.php b/tests/Core/File/FindExtendedClassNameTest.php index f26b616790..bb69f25680 100644 --- a/tests/Core/File/FindExtendedClassNameTest.php +++ b/tests/Core/File/FindExtendedClassNameTest.php @@ -74,7 +74,7 @@ public function testFindExtendedClassName($identifier, $expected) * * @return array> */ - public function dataExtendedClass() + public static function dataExtendedClass() { return [ 'class does not extend' => [ diff --git a/tests/Core/File/FindImplementedInterfaceNamesTest.php b/tests/Core/File/FindImplementedInterfaceNamesTest.php index e96b6f956d..bcf2cade27 100644 --- a/tests/Core/File/FindImplementedInterfaceNamesTest.php +++ b/tests/Core/File/FindImplementedInterfaceNamesTest.php @@ -73,7 +73,7 @@ public function testFindImplementedInterfaceNames($identifier, $expected) * * @return array>> */ - public function dataImplementedInterface() + public static function dataImplementedInterface() { return [ 'interface declaration, no implements' => [ diff --git a/tests/Core/File/GetClassPropertiesTest.php b/tests/Core/File/GetClassPropertiesTest.php index 5d182807b1..1bebc5893f 100644 --- a/tests/Core/File/GetClassPropertiesTest.php +++ b/tests/Core/File/GetClassPropertiesTest.php @@ -47,7 +47,7 @@ public function testNotAClassException($testMarker, $tokenType) * * @return array> */ - public function dataNotAClassException() + public static function dataNotAClassException() { return [ 'interface' => [ @@ -93,7 +93,7 @@ public function testGetClassProperties($testMarker, $expected) * * @return array>> */ - public function dataGetClassProperties() + public static function dataGetClassProperties() { return [ 'no-properties' => [ diff --git a/tests/Core/File/GetMemberPropertiesTest.php b/tests/Core/File/GetMemberPropertiesTest.php index df4973ceeb..5f2c4cdf95 100644 --- a/tests/Core/File/GetMemberPropertiesTest.php +++ b/tests/Core/File/GetMemberPropertiesTest.php @@ -60,7 +60,7 @@ public function testGetMemberProperties($identifier, $expected) * * @return array>> */ - public function dataGetMemberProperties() + public static function dataGetMemberProperties() { return [ 'var-modifier' => [ @@ -1106,7 +1106,7 @@ public function testNotClassPropertyException($identifier) * * @return array> */ - public function dataNotClassProperty() + public static function dataNotClassProperty() { return [ 'method parameter' => ['/* testMethodParam */'], diff --git a/tests/Core/File/IsReferenceTest.php b/tests/Core/File/IsReferenceTest.php index 0fd5516a7b..bbe31baef2 100644 --- a/tests/Core/File/IsReferenceTest.php +++ b/tests/Core/File/IsReferenceTest.php @@ -59,7 +59,7 @@ public function testIsReference($identifier, $expected) * * @return array> */ - public function dataIsReference() + public static function dataIsReference() { return [ 'issue-1971-list-first-in-file' => [ diff --git a/tests/Core/Ruleset/RuleInclusionTest.php b/tests/Core/Ruleset/RuleInclusionTest.php index 04ab4a6041..5659f7fb03 100644 --- a/tests/Core/Ruleset/RuleInclusionTest.php +++ b/tests/Core/Ruleset/RuleInclusionTest.php @@ -131,7 +131,7 @@ public function testRegisteredSniffCodes($key, $value) * * @return array */ - public function dataRegisteredSniffCodes() + public static function dataRegisteredSniffCodes() { return [ [ @@ -364,7 +364,7 @@ public function testSettingProperties($sniffClass, $propertyName, $expectedValue * * @return array */ - public function dataSettingProperties() + public static function dataSettingProperties() { return [ 'Set property for complete standard: PSR2 ClassDeclaration' => [ @@ -455,7 +455,7 @@ public function testSettingInvalidPropertiesOnStandardsAndCategoriesSilentlyFail * * @return array */ - public function dataSettingInvalidPropertiesOnStandardsAndCategoriesSilentlyFails() + public static function dataSettingInvalidPropertiesOnStandardsAndCategoriesSilentlyFails() { return [ 'Set property for complete standard: PSR2 ClassDeclaration' => [ diff --git a/tests/Core/Ruleset/SetSniffPropertyTest.php b/tests/Core/Ruleset/SetSniffPropertyTest.php index e23f2688ec..824ac73e38 100644 --- a/tests/Core/Ruleset/SetSniffPropertyTest.php +++ b/tests/Core/Ruleset/SetSniffPropertyTest.php @@ -74,7 +74,7 @@ public function testSniffPropertiesGetSetWhenAllowed($name) * * @return array */ - public function dataSniffPropertiesGetSetWhenAllowed() + public static function dataSniffPropertiesGetSetWhenAllowed() { return [ 'Property allowed as explicitly declared' => ['SetPropertyAllowedAsDeclared'], @@ -315,7 +315,7 @@ public function testDirectCallWithOldArrayFormatSetsProperty($propertyValue) * * @return array */ - public function dataDirectCallWithOldArrayFormatSetsProperty() + public static function dataDirectCallWithOldArrayFormatSetsProperty() { return [ 'Property value is not an array (boolean)' => [false], diff --git a/tests/Core/Tokenizer/AnonClassParenthesisOwnerTest.php b/tests/Core/Tokenizer/AnonClassParenthesisOwnerTest.php index e3683381d7..83652d9469 100644 --- a/tests/Core/Tokenizer/AnonClassParenthesisOwnerTest.php +++ b/tests/Core/Tokenizer/AnonClassParenthesisOwnerTest.php @@ -72,7 +72,7 @@ public function testAnonClassNoParenthesesNextOpenClose($testMarker) * * @return array */ - public function dataAnonClassNoParentheses() + public static function dataAnonClassNoParentheses() { return [ ['/* testNoParentheses */'], @@ -131,7 +131,7 @@ public function testAnonClassWithParentheses($testMarker) * * @return array */ - public function dataAnonClassWithParentheses() + public static function dataAnonClassWithParentheses() { return [ ['/* testWithParentheses */'], diff --git a/tests/Core/Tokenizer/ArrayKeywordTest.php b/tests/Core/Tokenizer/ArrayKeywordTest.php index 208b9f639d..56a02d4dde 100644 --- a/tests/Core/Tokenizer/ArrayKeywordTest.php +++ b/tests/Core/Tokenizer/ArrayKeywordTest.php @@ -51,7 +51,7 @@ public function testArrayKeyword($testMarker, $testContent='array') * * @return array */ - public function dataArrayKeyword() + public static function dataArrayKeyword() { return [ 'empty array' => ['/* testEmptyArray */'], @@ -103,7 +103,7 @@ public function testArrayType($testMarker, $testContent='array') * * @return array */ - public function dataArrayType() + public static function dataArrayType() { return [ 'closure return type' => [ @@ -154,7 +154,7 @@ public function testNotArrayKeyword($testMarker, $testContent='array') * * @return array */ - public function dataNotArrayKeyword() + public static function dataNotArrayKeyword() { return [ 'class-constant-name' => [ diff --git a/tests/Core/Tokenizer/AttributesTest.php b/tests/Core/Tokenizer/AttributesTest.php index 424fb9e586..ec0893f6dc 100644 --- a/tests/Core/Tokenizer/AttributesTest.php +++ b/tests/Core/Tokenizer/AttributesTest.php @@ -66,7 +66,7 @@ function ($token) use ($attribute, $length) { * * @return array */ - public function dataAttribute() + public static function dataAttribute() { return [ [ @@ -345,7 +345,7 @@ function ($token) use ($attribute, $length) { * * @return array */ - public function dataAttributeOnParameters() + public static function dataAttributeOnParameters() { return [ [ @@ -451,7 +451,7 @@ public function testAttributeContainingTextLookingLikeCloseTag($testMarker, $len * * @return array */ - public function dataAttributeOnTextLookingLikeCloseTag() + public static function dataAttributeOnTextLookingLikeCloseTag() { return [ [ diff --git a/tests/Core/Tokenizer/BackfillEnumTest.php b/tests/Core/Tokenizer/BackfillEnumTest.php index 544c9c53e3..c033cba41e 100644 --- a/tests/Core/Tokenizer/BackfillEnumTest.php +++ b/tests/Core/Tokenizer/BackfillEnumTest.php @@ -75,7 +75,7 @@ public function testEnums($testMarker, $testContent, $openerOffset, $closerOffse * * @return array */ - public function dataEnums() + public static function dataEnums() { return [ [ @@ -154,7 +154,7 @@ public function testNotEnums($testMarker, $testContent) * * @return array */ - public function dataNotEnums() + public static function dataNotEnums() { return [ [ diff --git a/tests/Core/Tokenizer/BackfillExplicitOctalNotationTest.php b/tests/Core/Tokenizer/BackfillExplicitOctalNotationTest.php index cbaf85bffb..4f67e567c9 100644 --- a/tests/Core/Tokenizer/BackfillExplicitOctalNotationTest.php +++ b/tests/Core/Tokenizer/BackfillExplicitOctalNotationTest.php @@ -49,7 +49,7 @@ public function testExplicitOctalNotation($marker, $value, $nextToken, $nextCont * * @return array */ - public function dataExplicitOctalNotation() + public static function dataExplicitOctalNotation() { return [ [ diff --git a/tests/Core/Tokenizer/BackfillFnTokenTest.php b/tests/Core/Tokenizer/BackfillFnTokenTest.php index 128d5a0f96..5058a85dc4 100644 --- a/tests/Core/Tokenizer/BackfillFnTokenTest.php +++ b/tests/Core/Tokenizer/BackfillFnTokenTest.php @@ -581,7 +581,7 @@ public function testInMatchValue($testMarker, $openerOffset, $closerOffset, $exp * * @return array */ - public function dataInMatchValue() + public static function dataInMatchValue() { return [ 'not_last_value' => [ @@ -671,7 +671,7 @@ public function testNotAnArrowFunction($testMarker, $testContent='fn') * * @return array */ - public function dataNotAnArrowFunction() + public static function dataNotAnArrowFunction() { return [ ['/* testFunctionName */'], diff --git a/tests/Core/Tokenizer/BackfillMatchTokenTest.php b/tests/Core/Tokenizer/BackfillMatchTokenTest.php index 0b4f58132d..99655b0f85 100644 --- a/tests/Core/Tokenizer/BackfillMatchTokenTest.php +++ b/tests/Core/Tokenizer/BackfillMatchTokenTest.php @@ -53,7 +53,7 @@ public function testMatchExpression($testMarker, $openerOffset, $closerOffset, $ * * @return array */ - public function dataMatchExpression() + public static function dataMatchExpression() { return [ 'simple_match' => [ @@ -243,7 +243,7 @@ public function testNotAMatchStructure($testMarker, $testContent='match') * * @return array */ - public function dataNotAMatchStructure() + public static function dataNotAMatchStructure() { return [ 'static_method_call' => ['/* testNoMatchStaticMethodCall */'], @@ -346,7 +346,7 @@ public function testSwitchExpression($testMarker, $openerOffset, $closerOffset) * * @return array */ - public function dataSwitchExpression() + public static function dataSwitchExpression() { return [ 'switch_containing_match' => [ @@ -399,7 +399,7 @@ public function testSwitchCaseVersusMatch($testMarker, $openerOffset, $closerOff * * @return array */ - public function dataSwitchCaseVersusMatch() + public static function dataSwitchCaseVersusMatch() { return [ 'switch_with_nested_match_case_1' => [ diff --git a/tests/Core/Tokenizer/BackfillNumericSeparatorTest.php b/tests/Core/Tokenizer/BackfillNumericSeparatorTest.php index 7f5151d2e8..1052d63e08 100644 --- a/tests/Core/Tokenizer/BackfillNumericSeparatorTest.php +++ b/tests/Core/Tokenizer/BackfillNumericSeparatorTest.php @@ -44,7 +44,7 @@ public function testBackfill($testData) * * @return array */ - public function dataTestBackfill() + public static function dataTestBackfill() { $testHexType = 'T_LNUMBER'; if (PHP_INT_MAX < 0xCAFEF00D) { @@ -191,7 +191,7 @@ public function testNoBackfill($testMarker, $expectedTokens) * * @return array */ - public function dataNoBackfill() + public static function dataNoBackfill() { return [ [ diff --git a/tests/Core/Tokenizer/BackfillReadonlyTest.php b/tests/Core/Tokenizer/BackfillReadonlyTest.php index 703f4903e9..b0f7a9ca7a 100644 --- a/tests/Core/Tokenizer/BackfillReadonlyTest.php +++ b/tests/Core/Tokenizer/BackfillReadonlyTest.php @@ -44,7 +44,7 @@ public function testReadonly($testMarker, $testContent) * * @return array */ - public function dataReadonly() + public static function dataReadonly() { return [ [ @@ -221,7 +221,7 @@ public function testNotReadonly($testMarker, $testContent) * * @return array */ - public function dataNotReadonly() + public static function dataNotReadonly() { return [ [ diff --git a/tests/Core/Tokenizer/BitwiseOrTest.php b/tests/Core/Tokenizer/BitwiseOrTest.php index 5360a3015d..c5b937d69a 100644 --- a/tests/Core/Tokenizer/BitwiseOrTest.php +++ b/tests/Core/Tokenizer/BitwiseOrTest.php @@ -43,7 +43,7 @@ public function testBitwiseOr($testMarker) * * @return array */ - public function dataBitwiseOr() + public static function dataBitwiseOr() { return [ ['/* testBitwiseOr1 */'], @@ -94,7 +94,7 @@ public function testTypeUnion($testMarker) * * @return array */ - public function dataTypeUnion() + public static function dataTypeUnion() { return [ ['/* testTypeUnionPropertySimple */'], diff --git a/tests/Core/Tokenizer/ContextSensitiveKeywordsTest.php b/tests/Core/Tokenizer/ContextSensitiveKeywordsTest.php index 2605aa1707..9326c57a96 100644 --- a/tests/Core/Tokenizer/ContextSensitiveKeywordsTest.php +++ b/tests/Core/Tokenizer/ContextSensitiveKeywordsTest.php @@ -45,7 +45,7 @@ public function testStrings($testMarker) * * @return array */ - public function dataStrings() + public static function dataStrings() { return [ ['/* testAbstract */'], @@ -187,7 +187,7 @@ public function testKeywords($testMarker, $expectedTokenType) * * @return array */ - public function dataKeywords() + public static function dataKeywords() { return [ [ diff --git a/tests/Core/Tokenizer/DefaultKeywordTest.php b/tests/Core/Tokenizer/DefaultKeywordTest.php index 7b04c45bff..b281fdd425 100644 --- a/tests/Core/Tokenizer/DefaultKeywordTest.php +++ b/tests/Core/Tokenizer/DefaultKeywordTest.php @@ -55,7 +55,7 @@ public function testMatchDefault($testMarker, $testContent='default') * * @return array */ - public function dataMatchDefault() + public static function dataMatchDefault() { return [ 'simple_match_default' => ['/* testSimpleMatchDefault */'], @@ -171,7 +171,7 @@ public function testSwitchDefault($testMarker, $openerOffset, $closerOffset, $co * * @return array */ - public function dataSwitchDefault() + public static function dataSwitchDefault() { return [ 'simple_switch_default' => [ @@ -246,7 +246,7 @@ public function testNotDefaultKeyword($testMarker, $testContent='DEFAULT') * * @return array */ - public function dataNotDefaultKeyword() + public static function dataNotDefaultKeyword() { return [ 'class-constant-as-short-array-key' => ['/* testClassConstantAsShortArrayKey */'], diff --git a/tests/Core/Tokenizer/DoubleArrowTest.php b/tests/Core/Tokenizer/DoubleArrowTest.php index f472a7548c..6fe3a5eee8 100644 --- a/tests/Core/Tokenizer/DoubleArrowTest.php +++ b/tests/Core/Tokenizer/DoubleArrowTest.php @@ -47,7 +47,7 @@ public function testDoubleArrow($testMarker) * * @return array */ - public function dataDoubleArrow() + public static function dataDoubleArrow() { return [ 'simple_long_array' => ['/* testLongArrayArrowSimple */'], @@ -132,7 +132,7 @@ public function testMatchArrow($testMarker) * * @return array */ - public function dataMatchArrow() + public static function dataMatchArrow() { return [ 'single_case' => ['/* testMatchArrowSimpleSingleCase */'], @@ -219,7 +219,7 @@ public function testFnArrow($testMarker) * * @return array */ - public function dataFnArrow() + public static function dataFnArrow() { return [ 'simple_fn' => ['/* testFnArrowSimple */'], diff --git a/tests/Core/Tokenizer/DoubleQuotedStringTest.php b/tests/Core/Tokenizer/DoubleQuotedStringTest.php index 55faae5380..c5c86972a8 100644 --- a/tests/Core/Tokenizer/DoubleQuotedStringTest.php +++ b/tests/Core/Tokenizer/DoubleQuotedStringTest.php @@ -44,7 +44,7 @@ public function testDoubleQuotedString($testMarker, $expectedContent) * * @return array */ - public function dataDoubleQuotedString() + public static function dataDoubleQuotedString() { return [ [ diff --git a/tests/Core/Tokenizer/EnumCaseTest.php b/tests/Core/Tokenizer/EnumCaseTest.php index c4989ae098..4b41312675 100644 --- a/tests/Core/Tokenizer/EnumCaseTest.php +++ b/tests/Core/Tokenizer/EnumCaseTest.php @@ -49,7 +49,7 @@ public function testEnumCases($testMarker) * * @return array */ - public function dataEnumCases() + public static function dataEnumCases() { return [ ['/* testPureEnumCase */'], @@ -98,7 +98,7 @@ public function testNotEnumCases($testMarker) * * @return array */ - public function dataNotEnumCases() + public static function dataNotEnumCases() { return [ ['/* testCaseWithSemicolonIsNotEnumCase */'], @@ -142,7 +142,7 @@ public function testKeywordAsEnumCaseNameShouldBeString($testMarker) * * @return array */ - public function dataKeywordAsEnumCaseNameShouldBeString() + public static function dataKeywordAsEnumCaseNameShouldBeString() { return [ ['/* testKeywordAsEnumCaseNameShouldBeString1 */'], diff --git a/tests/Core/Tokenizer/FinallyTest.php b/tests/Core/Tokenizer/FinallyTest.php index 587ebc69fe..571bf0ae75 100644 --- a/tests/Core/Tokenizer/FinallyTest.php +++ b/tests/Core/Tokenizer/FinallyTest.php @@ -43,7 +43,7 @@ public function testFinallyKeyword($testMarker) * * @return array */ - public function dataFinallyKeyword() + public static function dataFinallyKeyword() { return [ ['/* testTryCatchFinally */'], @@ -82,7 +82,7 @@ public function testFinallyNonKeyword($testMarker) * * @return array */ - public function dataFinallyNonKeyword() + public static function dataFinallyNonKeyword() { return [ ['/* testFinallyUsedAsClassConstantName */'], diff --git a/tests/Core/Tokenizer/GotoLabelTest.php b/tests/Core/Tokenizer/GotoLabelTest.php index 3825a3d1c9..cf52a77758 100644 --- a/tests/Core/Tokenizer/GotoLabelTest.php +++ b/tests/Core/Tokenizer/GotoLabelTest.php @@ -45,7 +45,7 @@ public function testGotoStatement($testMarker, $testContent) * * @return array */ - public function dataGotoStatement() + public static function dataGotoStatement() { return [ [ @@ -91,7 +91,7 @@ public function testGotoDeclaration($testMarker, $testContent) * * @return array */ - public function dataGotoDeclaration() + public static function dataGotoDeclaration() { return [ [ @@ -136,7 +136,7 @@ public function testNotAGotoDeclaration($testMarker, $testContent) * * @return array */ - public function dataNotAGotoDeclaration() + public static function dataNotAGotoDeclaration() { return [ [ diff --git a/tests/Core/Tokenizer/HeredocNowdocCloserTest.php b/tests/Core/Tokenizer/HeredocNowdocCloserTest.php index bce3b9c834..2902556a2e 100644 --- a/tests/Core/Tokenizer/HeredocNowdocCloserTest.php +++ b/tests/Core/Tokenizer/HeredocNowdocCloserTest.php @@ -93,7 +93,7 @@ public function testHeredocNowdocCloserTabReplacement($testMarker, $expected) * * @return array */ - public function dataHeredocNowdocCloserTabReplacement() + public static function dataHeredocNowdocCloserTabReplacement() { return [ [ diff --git a/tests/Core/Tokenizer/HeredocStringTest.php b/tests/Core/Tokenizer/HeredocStringTest.php index 35e39db099..2aa04a1bdc 100644 --- a/tests/Core/Tokenizer/HeredocStringTest.php +++ b/tests/Core/Tokenizer/HeredocStringTest.php @@ -66,7 +66,7 @@ public function testHeredocStringWrapped($testMarker, $expectedContent) * * @return array */ - public function dataHeredocString() + public static function dataHeredocString() { return [ [ diff --git a/tests/Core/Tokenizer/NamedFunctionCallArgumentsTest.php b/tests/Core/Tokenizer/NamedFunctionCallArgumentsTest.php index 90df5fefa3..f0ca635357 100644 --- a/tests/Core/Tokenizer/NamedFunctionCallArgumentsTest.php +++ b/tests/Core/Tokenizer/NamedFunctionCallArgumentsTest.php @@ -76,7 +76,7 @@ public function testNamedFunctionCallArguments($testMarker, $parameters) * * @return array */ - public function dataNamedFunctionCallArguments() + public static function dataNamedFunctionCallArguments() { return [ [ @@ -296,7 +296,7 @@ public function testOtherTstringInFunctionCall($testMarker, $content) * * @return array */ - public function dataOtherTstringInFunctionCall() + public static function dataOtherTstringInFunctionCall() { return [ [ @@ -746,7 +746,7 @@ public function testReservedKeywordsAsName($testMarker, $tokenTypes, $tokenConte * * @return array */ - public function dataReservedKeywordsAsName() + public static function dataReservedKeywordsAsName() { $reservedKeywords = [ // '__halt_compiler', NOT TESTABLE diff --git a/tests/Core/Tokenizer/NullsafeObjectOperatorTest.php b/tests/Core/Tokenizer/NullsafeObjectOperatorTest.php index f29c7a8a55..8c4f5ab97d 100644 --- a/tests/Core/Tokenizer/NullsafeObjectOperatorTest.php +++ b/tests/Core/Tokenizer/NullsafeObjectOperatorTest.php @@ -73,7 +73,7 @@ public function testNullsafeObjectOperator($testMarker) * * @return array */ - public function dataNullsafeObjectOperator() + public static function dataNullsafeObjectOperator() { return [ ['/* testNullsafeObjectOperator */'], @@ -119,7 +119,7 @@ public function testTernaryThen($testMarker, $testObjectOperator=false) * * @return array */ - public function dataTernaryThen() + public static function dataTernaryThen() { return [ ['/* testTernaryThen */'], diff --git a/tests/Core/Tokenizer/ScopeSettingWithNamespaceOperatorTest.php b/tests/Core/Tokenizer/ScopeSettingWithNamespaceOperatorTest.php index b2ecd8a522..872979f7fe 100644 --- a/tests/Core/Tokenizer/ScopeSettingWithNamespaceOperatorTest.php +++ b/tests/Core/Tokenizer/ScopeSettingWithNamespaceOperatorTest.php @@ -61,7 +61,7 @@ public function testScopeSetting($testMarker, $tokenTypes, $open=T_OPEN_CURLY_BR * * @return array */ - public function dataScopeSetting() + public static function dataScopeSetting() { return [ [ diff --git a/tests/Core/Tokenizer/ShortArrayTest.php b/tests/Core/Tokenizer/ShortArrayTest.php index 9e73f61b3e..a4273adc90 100644 --- a/tests/Core/Tokenizer/ShortArrayTest.php +++ b/tests/Core/Tokenizer/ShortArrayTest.php @@ -49,7 +49,7 @@ public function testSquareBrackets($testMarker) * * @return array */ - public function dataSquareBrackets() + public static function dataSquareBrackets() { return [ 'array access 1' => ['/* testArrayAccess1 */'], @@ -114,7 +114,7 @@ public function testShortArrays($testMarker) * * @return array */ - public function dataShortArrays() + public static function dataShortArrays() { return [ 'short array empty' => ['/* testShortArrayDeclarationEmpty */'], diff --git a/tests/Core/Tokenizer/StableCommentWhitespaceTest.php b/tests/Core/Tokenizer/StableCommentWhitespaceTest.php index 9e57542dbc..3b5ffeb963 100644 --- a/tests/Core/Tokenizer/StableCommentWhitespaceTest.php +++ b/tests/Core/Tokenizer/StableCommentWhitespaceTest.php @@ -56,7 +56,7 @@ public function testCommentTokenization($testMarker, $expectedTokens) * * @return array */ - public function dataCommentTokenization() + public static function dataCommentTokenization() { return [ [ diff --git a/tests/Core/Tokenizer/StableCommentWhitespaceWinTest.php b/tests/Core/Tokenizer/StableCommentWhitespaceWinTest.php index f78aa4769a..a85ba73cb9 100644 --- a/tests/Core/Tokenizer/StableCommentWhitespaceWinTest.php +++ b/tests/Core/Tokenizer/StableCommentWhitespaceWinTest.php @@ -53,7 +53,7 @@ public function testCommentTokenization($testMarker, $expectedTokens) * * @return array */ - public function dataCommentTokenization() + public static function dataCommentTokenization() { return [ [ diff --git a/tests/Core/Tokenizer/TypeIntersectionTest.php b/tests/Core/Tokenizer/TypeIntersectionTest.php index fa888f7c36..7c27e07050 100644 --- a/tests/Core/Tokenizer/TypeIntersectionTest.php +++ b/tests/Core/Tokenizer/TypeIntersectionTest.php @@ -44,7 +44,7 @@ public function testBitwiseAnd($testMarker) * * @return array */ - public function dataBitwiseAnd() + public static function dataBitwiseAnd() { return [ ['/* testBitwiseAnd1 */'], @@ -97,7 +97,7 @@ public function testTypeIntersection($testMarker) * * @return array */ - public function dataTypeIntersection() + public static function dataTypeIntersection() { return [ ['/* testTypeIntersectionPropertySimple */'], diff --git a/tests/Core/Tokenizer/UndoNamespacedNameSingleTokenTest.php b/tests/Core/Tokenizer/UndoNamespacedNameSingleTokenTest.php index a3c8fd6081..2fa8d0e714 100644 --- a/tests/Core/Tokenizer/UndoNamespacedNameSingleTokenTest.php +++ b/tests/Core/Tokenizer/UndoNamespacedNameSingleTokenTest.php @@ -59,7 +59,7 @@ public function testIdentifierTokenization($testMarker, $expectedTokens) * * @return array */ - public function dataIdentifierTokenization() + public static function dataIdentifierTokenization() { return [ [ diff --git a/tests/Core/Util/SuggestTypeTest.php b/tests/Core/Util/SuggestTypeTest.php index 1b24a5a788..48790a888c 100644 --- a/tests/Core/Util/SuggestTypeTest.php +++ b/tests/Core/Util/SuggestTypeTest.php @@ -57,7 +57,7 @@ public function testSuggestTypeAllowedType($varType) * * @return array> */ - public function dataSuggestTypeAllowedType() + public static function dataSuggestTypeAllowedType() { $data = []; foreach (Common::$allowedTypes as $type) { @@ -94,7 +94,7 @@ public function testSuggestTypeAllowedTypeWrongCase($varType, $expected) * * @return array> */ - public function dataSuggestTypeAllowedTypeWrongCase() + public static function dataSuggestTypeAllowedTypeWrongCase() { $data = []; foreach (Common::$allowedTypes as $type) { @@ -138,7 +138,7 @@ public function testSuggestTypeOther($varType, $expected) * * @return array> */ - public function dataSuggestTypeOther() + public static function dataSuggestTypeOther() { return [ // Short forms.