Skip to content

Commit 3811672

Browse files
committed
Auto-apply fixes for static data providers
1 parent 846959f commit 3811672

File tree

174 files changed

+351
-351
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+351
-351
lines changed

tests/PHPStan/Analyser/AnalyserTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public function testIgnoreErrorMultiByPath(): void
152152
$this->assertNoErrors($result);
153153
}
154154

155-
public function dataIgnoreErrorByPathAndCount(): iterable
155+
public static function dataIgnoreErrorByPathAndCount(): iterable
156156
{
157157
yield [
158158
[
@@ -204,7 +204,7 @@ public function testIgnoreErrorByPathAndCount(array $ignoreErrors): void
204204
$this->assertNoErrors($result);
205205
}
206206

207-
public function dataTrueAndFalse(): array
207+
public static function dataTrueAndFalse(): array
208208
{
209209
return [
210210
[true],
@@ -422,7 +422,7 @@ public function testIgnoreErrorNotFoundInPathExplicitReportUnmatched(): void
422422
$this->assertSame('Ignored error pattern #Fail\.# in path ' . __DIR__ . '/data/not-existent-path.php was not matched in reported errors.', $result[0]);
423423
}
424424

425-
public function dataIgnoreErrorInTraitUsingClassFilePath(): array
425+
public static function dataIgnoreErrorInTraitUsingClassFilePath(): array
426426
{
427427
return [
428428
[

tests/PHPStan/Analyser/ArgumentsNormalizerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
class ArgumentsNormalizerTest extends PHPStanTestCase
2323
{
2424

25-
public function dataReorderValid(): iterable
25+
public static function dataReorderValid(): iterable
2626
{
2727
yield [
2828
[
@@ -298,7 +298,7 @@ public function testReorderValid(
298298
}
299299
}
300300

301-
public function dataReorderInvalid(): iterable
301+
public static function dataReorderInvalid(): iterable
302302
{
303303
yield [
304304
[

tests/PHPStan/Analyser/AssertStubTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class AssertStubTest extends TypeInferenceTestCase
88
{
99

10-
public function dataFileAsserts(): iterable
10+
public static function dataFileAsserts(): iterable
1111
{
1212
yield from $this->gatherAssertTypes(__DIR__ . '/data/assert-stub.php');
1313
}

tests/PHPStan/Analyser/Bug10922Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class Bug10922Test extends TypeInferenceTestCase
88
{
99

10-
public function dataFileAsserts(): iterable
10+
public static function dataFileAsserts(): iterable
1111
{
1212
yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-10922.php');
1313
}

tests/PHPStan/Analyser/Bug10980Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class Bug10980Test extends TypeInferenceTestCase
88
{
99

10-
public function dataFileAsserts(): iterable
10+
public static function dataFileAsserts(): iterable
1111
{
1212
yield from self::gatherAssertTypes(__DIR__ . '/data/bug-10980.php');
1313
}

tests/PHPStan/Analyser/Bug11009Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class Bug11009Test extends TypeInferenceTestCase
88
{
99

10-
public function dataFileAsserts(): iterable
10+
public static function dataFileAsserts(): iterable
1111
{
1212
yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-11009.php');
1313
}

tests/PHPStan/Analyser/Bug9307Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class Bug9307Test extends TypeInferenceTestCase
88
{
99

10-
public function dataFileAsserts(): iterable
10+
public static function dataFileAsserts(): iterable
1111
{
1212
yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-9307.php');
1313
}

tests/PHPStan/Analyser/ClassConstantStubFileTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class ClassConstantStubFileTest extends TypeInferenceTestCase
88
{
99

10-
public function dataFileAsserts(): iterable
10+
public static function dataFileAsserts(): iterable
1111
{
1212
yield from $this->gatherAssertTypes(__DIR__ . '/data/class-constant-stub-files.php');
1313
}

tests/PHPStan/Analyser/ConditionalReturnTypeFromMethodStubTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class ConditionalReturnTypeFromMethodStubTest extends TypeInferenceTestCase
88
{
99

10-
public function dataFileAsserts(): iterable
10+
public static function dataFileAsserts(): iterable
1111
{
1212
yield from $this->gatherAssertTypes(__DIR__ . '/data/conditional-return-type-stub.php');
1313
}

tests/PHPStan/Analyser/DoNotPolluteScopeWithBlockTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class DoNotPolluteScopeWithBlockTest extends TypeInferenceTestCase
88
{
99

10-
public function dataFileAsserts(): iterable
10+
public static function dataFileAsserts(): iterable
1111
{
1212
yield from $this->gatherAssertTypes(__DIR__ . '/data/do-not-pollute-scope-with-block.php');
1313
}

tests/PHPStan/Analyser/DoNotRememberPossiblyImpureFunctionValuesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class DoNotRememberPossiblyImpureFunctionValuesTest extends TypeInferenceTestCase
88
{
99

10-
public function dataAsserts(): iterable
10+
public static function dataAsserts(): iterable
1111
{
1212
yield from $this->gatherAssertTypes(__DIR__ . '/data/do-not-remember-possibly-impure-function-values.php');
1313
}

tests/PHPStan/Analyser/DynamicMethodThrowTypeExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class DynamicMethodThrowTypeExtensionTest extends TypeInferenceTestCase
99
{
1010

11-
public function dataFileAsserts(): iterable
11+
public static function dataFileAsserts(): iterable
1212
{
1313
if (PHP_VERSION_ID < 80000) {
1414
return [];

tests/PHPStan/Analyser/DynamicReturnTypeExtensionTypeInferenceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class DynamicReturnTypeExtensionTypeInferenceTest extends TypeInferenceTestCase
99
{
1010

11-
public function dataAsserts(): iterable
11+
public static function dataAsserts(): iterable
1212
{
1313
yield from $this->gatherAssertTypes(__DIR__ . '/data/dynamic-method-return-types.php');
1414

tests/PHPStan/Analyser/ErrorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function testError(): void
1515
$this->assertSame(10, $error->getLine());
1616
}
1717

18-
public function dataValidIdentifier(): iterable
18+
public static function dataValidIdentifier(): iterable
1919
{
2020
yield ['a'];
2121
yield ['aa'];
@@ -37,7 +37,7 @@ public function testValidIdentifier(string $identifier): void
3737
$this->assertTrue(Error::validateIdentifier($identifier));
3838
}
3939

40-
public function dataInvalidIdentifier(): iterable
40+
public static function dataInvalidIdentifier(): iterable
4141
{
4242
yield [''];
4343
yield [' '];

tests/PHPStan/Analyser/ExpressionTypeResolverExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class ExpressionTypeResolverExtensionTest extends TypeInferenceTestCase
88
{
99

10-
public function dataFileAsserts(): iterable
10+
public static function dataFileAsserts(): iterable
1111
{
1212
yield from self::gatherAssertTypes(__DIR__ . '/data/expression-type-resolver-extension.php');
1313
}

tests/PHPStan/Analyser/Ignore/IgnoreLexerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class IgnoreLexerTest extends PHPStanTestCase
1111
{
1212

13-
public function dataTokenize(): iterable
13+
public static function dataTokenize(): iterable
1414
{
1515
yield [
1616
'',

tests/PHPStan/Analyser/ImmediatelyCalledFunctionWithoutImplicitThrowTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class ImmediatelyCalledFunctionWithoutImplicitThrowTest extends TypeInferenceTestCase
99
{
1010

11-
public function dataFileAsserts(): iterable
11+
public static function dataFileAsserts(): iterable
1212
{
1313
yield from $this->gatherAssertTypes(__DIR__ . '/data/immediately-called-function-without-implicit-throw.php');
1414
}

tests/PHPStan/Analyser/LooseConstComparisonPhp7Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class LooseConstComparisonPhp7Test extends TypeInferenceTestCase
1010
/**
1111
* @return iterable<array<string, mixed[]>>
1212
*/
13-
public function dataFileAsserts(): iterable
13+
public static function dataFileAsserts(): iterable
1414
{
1515
// compares constants according to the php-version phpstan configuration,
1616
// _NOT_ the current php runtime version

tests/PHPStan/Analyser/LooseConstComparisonPhp8Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class LooseConstComparisonPhp8Test extends TypeInferenceTestCase
1010
/**
1111
* @return iterable<array<string, mixed[]>>
1212
*/
13-
public function dataFileAsserts(): iterable
13+
public static function dataFileAsserts(): iterable
1414
{
1515
// compares constants according to the php-version phpstan configuration,
1616
// _NOT_ the current php runtime version

tests/PHPStan/Analyser/ParamClosureThisStubsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class ParamClosureThisStubsTest extends TypeInferenceTestCase
88
{
99

10-
public function dataAsserts(): iterable
10+
public static function dataAsserts(): iterable
1111
{
1212
yield from $this->gatherAssertTypes(__DIR__ . '/data/param-closure-this-stubs.php');
1313
}

tests/PHPStan/Analyser/ParamOutTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class ParamOutTypeTest extends TypeInferenceTestCase
88
{
99

10-
public function dataFileAsserts(): iterable
10+
public static function dataFileAsserts(): iterable
1111
{
1212
yield from $this->gatherAssertTypes(__DIR__ . '/data/param-out.php');
1313
}

tests/PHPStan/Analyser/ParameterClosureTypeExtensionArrowFunctionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class ParameterClosureTypeExtensionArrowFunctionTest extends TypeInferenceTestCase
88
{
99

10-
public function dataFileAsserts(): iterable
10+
public static function dataFileAsserts(): iterable
1111
{
1212
yield from $this->gatherAssertTypes(__DIR__ . '/data/parameter-closure-type-extension-arrow-function.php');
1313
}

tests/PHPStan/Analyser/ParameterClosureTypeExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class ParameterClosureTypeExtensionTest extends TypeInferenceTestCase
88
{
99

10-
public function dataFileAsserts(): iterable
10+
public static function dataFileAsserts(): iterable
1111
{
1212
yield from $this->gatherAssertTypes(__DIR__ . '/data/parameter-closure-type-extension.php');
1313
}

tests/PHPStan/Analyser/ParameterOutTypeExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class ParameterOutTypeExtensionTest extends TypeInferenceTestCase
88
{
99

10-
public function dataAsserts(): iterable
10+
public static function dataAsserts(): iterable
1111
{
1212
yield from $this->gatherAssertTypes(__DIR__ . '/data/param-out/parameter-out-types.php');
1313
}

tests/PHPStan/Analyser/PathConstantsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class PathConstantsTest extends TypeInferenceTestCase
99
{
1010

11-
public function dataFileAsserts(): iterable
11+
public static function dataFileAsserts(): iterable
1212
{
1313
if (DIRECTORY_SEPARATOR === '\\') {
1414
yield from $this->gatherAssertTypes(__DIR__ . '/data/pathConstants-win.php');

tests/PHPStan/Analyser/ScopePhpVersionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class ScopePhpVersionTest extends TypeInferenceTestCase
1111
{
1212

13-
public function dataTestPhpVersion(): array
13+
public static function dataTestPhpVersion(): array
1414
{
1515
return [
1616
[

tests/PHPStan/Analyser/ScopeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
class ScopeTest extends PHPStanTestCase
2424
{
2525

26-
public function dataGeneralize(): array
26+
public static function dataGeneralize(): array
2727
{
2828
return [
2929
[

tests/PHPStan/Analyser/StatementResultTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class StatementResultTest extends PHPStanTestCase
1616
{
1717

18-
public function dataIsAlwaysTerminating(): array
18+
public static function dataIsAlwaysTerminating(): array
1919
{
2020
return [
2121
[

tests/PHPStan/Analyser/ThrowsTagFromNativeFunctionStubTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class ThrowsTagFromNativeFunctionStubTest extends TypeInferenceTestCase
88
{
99

10-
public function dataFileAsserts(): iterable
10+
public static function dataFileAsserts(): iterable
1111
{
1212
yield from $this->gatherAssertTypes(__DIR__ . '/data/throws-tag-from-native-function-stub.php');
1313
}

tests/PHPStan/Analyser/TraitStubFilesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class TraitStubFilesTest extends TypeInferenceTestCase
88
{
99

10-
public function dataFileAsserts(): iterable
10+
public static function dataFileAsserts(): iterable
1111
{
1212
yield from $this->gatherAssertTypes(__DIR__ . '/data/trait-stubs.php');
1313
}

tests/PHPStan/Analyser/TypeSpecifierContextTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class TypeSpecifierContextTest extends PHPStanTestCase
99
{
1010

11-
public function dataContext(): array
11+
public static function dataContext(): array
1212
{
1313
return [
1414
[
@@ -47,7 +47,7 @@ public function testContext(TypeSpecifierContext $context, array $results): void
4747
$this->assertSame($results[4], $context->null());
4848
}
4949

50-
public function dataNegate(): array
50+
public static function dataNegate(): array
5151
{
5252
return [
5353
[

tests/PHPStan/Analyser/TypeSpecifierTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function testCondition(Expr $expr, array $expectedPositiveResult, array $
9595
$this->assertSame($expectedNegatedResult, $actualResult, sprintf('if not (%s)', $this->printer->prettyPrintExpr($expr)));
9696
}
9797

98-
public function dataCondition(): iterable
98+
public static function dataCondition(): iterable
9999
{
100100
if (PHP_VERSION_ID >= 80100) {
101101
yield [

tests/PHPStan/Analyser/TypeSpecifyingExtensionTypeInferenceFalseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class TypeSpecifyingExtensionTypeInferenceFalseTest extends TypeInferenceTestCase
88
{
99

10-
public function dataTypeSpecifyingExtensionsFalse(): iterable
10+
public static function dataTypeSpecifyingExtensionsFalse(): iterable
1111
{
1212
yield from $this->gatherAssertTypes(__DIR__ . '/data/type-specifying-extensions-1-false.php');
1313
yield from $this->gatherAssertTypes(__DIR__ . '/data/type-specifying-extensions-2-false.php');

tests/PHPStan/Analyser/TypeSpecifyingExtensionTypeInferenceNullTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class TypeSpecifyingExtensionTypeInferenceNullTest extends TypeInferenceTestCase
88
{
99

10-
public function dataTypeSpecifyingExtensionsNull(): iterable
10+
public static function dataTypeSpecifyingExtensionsNull(): iterable
1111
{
1212
yield from $this->gatherAssertTypes(__DIR__ . '/data/type-specifying-extensions-1-null.php');
1313
yield from $this->gatherAssertTypes(__DIR__ . '/data/type-specifying-extensions-2-null.php');

tests/PHPStan/Analyser/TypeSpecifyingExtensionTypeInferenceTrueTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class TypeSpecifyingExtensionTypeInferenceTrueTest extends TypeInferenceTestCase
88
{
99

10-
public function dataTypeSpecifyingExtensionsTrue(): iterable
10+
public static function dataTypeSpecifyingExtensionsTrue(): iterable
1111
{
1212
yield from $this->gatherAssertTypes(__DIR__ . '/data/type-specifying-extensions-1-true.php');
1313
yield from $this->gatherAssertTypes(__DIR__ . '/data/type-specifying-extensions-2-true.php');

tests/PHPStan/Command/CommandHelperTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
class CommandHelperTest extends TestCase
2020
{
2121

22-
public function dataBegin(): array
22+
public static function dataBegin(): array
2323
{
2424
return [
2525
[
@@ -162,7 +162,7 @@ public function testBegin(
162162
}
163163
}
164164

165-
public function dataParameters(): array
165+
public static function dataParameters(): array
166166
{
167167
return [
168168
[

0 commit comments

Comments
 (0)