Skip to content

Commit f536986

Browse files
committed
Configure php_unit_data_provider_return_type fixer
1 parent 70eade0 commit f536986

Some content is hidden

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

50 files changed

+134
-143
lines changed

.php-cs-fixer.dist.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@
4343
__DIR__ . '/spark',
4444
]);
4545

46-
$overrides = [];
46+
$overrides = [
47+
'php_unit_data_provider_return_type' => true,
48+
];
4749

4850
$options = [
4951
'cacheFile' => 'build/.php-cs-fixer.cache',

.php-cs-fixer.no-header.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
__DIR__ . '/admin/starter/builds',
3030
]);
3131

32-
$overrides = [];
32+
$overrides = [
33+
'php_unit_data_provider_return_type' => true,
34+
];
3335

3436
$options = [
3537
'cacheFile' => 'build/.php-cs-fixer.no-header.cache',

.php-cs-fixer.user-guide.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@
2929
]);
3030

3131
$overrides = [
32-
'echo_tag_syntax' => false,
33-
'php_unit_internal_class' => false,
34-
'no_unused_imports' => false,
35-
'class_attributes_separation' => false,
32+
'echo_tag_syntax' => false,
33+
'php_unit_internal_class' => false,
34+
'no_unused_imports' => false,
35+
'class_attributes_separation' => false,
36+
'php_unit_data_provider_return_type' => true,
3637
];
3738

3839
$options = [

tests/system/CLI/CLITest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ public function testTable($tbody, $thead, $expected)
463463
$this->assertSame($this->getStreamFilterBuffer(), $expected);
464464
}
465465

466-
public function tableProvider()
466+
public function tableProvider(): iterable
467467
{
468468
$head = [
469469
'ID',

tests/system/Cache/Handlers/BaseHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function testValidateKeyInvalidType($input)
3535
BaseHandler::validateKey($input);
3636
}
3737

38-
public function invalidTypeProvider(): array
38+
public function invalidTypeProvider(): iterable
3939
{
4040
return [
4141
[true],

tests/system/Cache/Handlers/FileHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ public function testSaveMode(int $int, string $string): void
296296
$this->assertSame($string, $mode);
297297
}
298298

299-
public function modeProvider()
299+
public function modeProvider(): iterable
300300
{
301301
return [
302302
[

tests/system/CodeIgniterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ public function testPageCacheWithCacheQueryString($cacheQueryStringValue, int $e
789789
CITestStreamFilter::removeErrorFilter();
790790
}
791791

792-
public function cacheQueryStringProvider(): array
792+
public function cacheQueryStringProvider(): iterable
793793
{
794794
$testingUrls = [
795795
'test', // URL #1

tests/system/Commands/CommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function testCommandParsesArgsCorrectly(string $input, array $expected)
138138
$this->assertSame($expected, ParamsReveal::$args);
139139
}
140140

141-
public function commandArgsProvider(): array
141+
public function commandArgsProvider(): iterable
142142
{
143143
return [
144144
[

tests/system/Commands/Utilities/Routes/SampleURIGeneratorTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use CodeIgniter\Config\Services;
1515
use CodeIgniter\Test\CIUnitTestCase;
16-
use Generator;
1716

1817
/**
1918
* @internal
@@ -34,7 +33,7 @@ public function testGet(string $routeKey, string $expected)
3433
$this->assertSame($expected, $uri);
3534
}
3635

37-
public function routeKeyProvider(): Generator
36+
public function routeKeyProvider(): iterable
3837
{
3938
yield from [
4039
'root' => ['/', '/'],

tests/system/CommonFunctionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ public function testCleanPathActuallyCleaningThePaths($input, $expected)
604604
$this->assertSame($expected, clean_path($input));
605605
}
606606

607-
public function dirtyPathsProvider()
607+
public function dirtyPathsProvider(): iterable
608608
{
609609
$ds = DIRECTORY_SEPARATOR;
610610

0 commit comments

Comments
 (0)