Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6687e4e

Browse files
committed
minor#58326 Mutate remaining data providers to static ones (alexandre-daubois)
This PR was merged into the 5.4 branch.Discussion----------Mutate remaining data providers to static ones| Q | A| ------------- | ---| Branch? | 5.4| Bug fix? | no| New feature? | no| Deprecations? | no| Issues | -| License | MITNon-static data providers are deprecated.Commits-------3035e99 Mutate remaining data providers to static ones
2 parents8797be8 +3035e99 commit6687e4e

File tree

7 files changed

+18
-26
lines changed

7 files changed

+18
-26
lines changed

‎src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public static function provideInlineStyleOptionsCases()
200200
];
201201
}
202202

203-
publicfunctionprovideInlineStyleTagsWithUnknownOptions()
203+
publicstaticfunctionprovideInlineStyleTagsWithUnknownOptions()
204204
{
205205
return [
206206
['<options=abc;>','abc'],

‎src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ public static function provideDistinguishedChoices()
586586
];
587587
}
588588

589-
publicfunctionprovideSameKeyChoices()
589+
publicstaticfunctionprovideSameKeyChoices()
590590
{
591591
// Only test types here that can be used as array keys
592592
return [
@@ -597,7 +597,7 @@ public function provideSameKeyChoices()
597597
];
598598
}
599599

600-
publicfunctionprovideDistinguishedKeyChoices()
600+
publicstaticfunctionprovideDistinguishedKeyChoices()
601601
{
602602
// Only test types here that can be used as array keys
603603
return [

‎src/Symfony/Component/Intl/Tests/LocalesTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ class LocalesTest extends ResourceBundleTestCase
2121
{
2222
publicfunctiontestGetLocales()
2323
{
24-
$this->assertSame($this->getLocales(), Locales::getLocales());
24+
$this->assertSame(static::getLocales(), Locales::getLocales());
2525
}
2626

2727
publicfunctiontestGetAliases()
2828
{
29-
$this->assertSame($this->getLocaleAliases(), Locales::getAliases());
29+
$this->assertSame(static::getLocaleAliases(), Locales::getAliases());
3030
}
3131

3232
/**
@@ -41,7 +41,7 @@ public function testGetNames($displayLocale)
4141
// We can't assert on exact list of locale, as there's too many variations.
4242
// The best we can do is to make sure getNames() returns a subset of what getLocales() returns.
4343
$this->assertNotEmpty($locales);
44-
$this->assertEmpty(array_diff($locales,$this->getLocales()));
44+
$this->assertEmpty(array_diff($locales,static::getLocales()));
4545
}
4646

4747
publicfunctiontestGetNamesDefaultLocale()

‎src/Symfony/Component/Intl/Tests/ResourceBundleTestCase.php

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -758,45 +758,37 @@ protected function tearDown(): void
758758
\Locale::setDefault($this->defaultLocale);
759759
}
760760

761-
publicfunctionprovideLocales()
761+
publicstaticfunctionprovideLocales()
762762
{
763763
returnarray_map(
764764
function ($locale) {return [$locale]; },
765-
$this->getLocales()
765+
static::getLocales()
766766
);
767767
}
768768

769-
publicfunctionprovideLocaleAliases()
769+
publicstaticfunctionprovideLocaleAliases()
770770
{
771771
returnarray_map(
772772
function ($alias,$ofLocale) {return [$alias,$ofLocale]; },
773-
array_keys($this->getLocaleAliases()),
774-
$this->getLocaleAliases()
773+
array_keys(static::getLocaleAliases()),
774+
static::getLocaleAliases()
775775
);
776776
}
777777

778-
publicfunctionprovideRootLocales()
779-
{
780-
returnarray_map(
781-
function ($locale) {return [$locale]; },
782-
$this->getRootLocales()
783-
);
784-
}
785-
786-
protectedfunctiongetLocales()
778+
protectedstaticfunctiongetLocales()
787779
{
788780
returnself::LOCALES;
789781
}
790782

791-
protectedfunctiongetLocaleAliases()
783+
protectedstaticfunctiongetLocaleAliases()
792784
{
793785
returnself::LOCALE_ALIASES;
794786
}
795787

796-
protectedfunctiongetRootLocales()
788+
protectedstaticfunctiongetRootLocales()
797789
{
798790
if (null ===self::$rootLocales) {
799-
self::$rootLocales =array_filter($this->getLocales(),function ($locale) {
791+
self::$rootLocales =array_filter(static::getLocales(),function ($locale) {
800792
// no locales for which fallback is possible (e.g "en_GB")
801793
return !str_contains($locale,'_');
802794
});

‎src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ public function testFindAllSqlGenerated(AbstractPlatform $platform, string $expe
500500
$connection->findAll(50);
501501
}
502502

503-
publicfunctionprovideFindAllSqlGeneratedByPlatform():iterable
503+
publicstaticfunctionprovideFindAllSqlGeneratedByPlatform():iterable
504504
{
505505
yield'MySQL' => [
506506
class_exists(MySQLPlatform::class) ?newMySQLPlatform() :newMySQL57Platform(),

‎src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ public function testDenormalizeBooleanTypesWithNotMatchingData(array $data, stri
701701
$normalizer->denormalize($data,$type);
702702
}
703703

704-
publicfunctionprovideBooleanTypesData()
704+
publicstaticfunctionprovideBooleanTypesData()
705705
{
706706
return [
707707
[['foo' =>true], FalsePropertyDummy::class],

‎src/Symfony/Component/String/Tests/AbstractUnicodeTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function testAsciiClosureRule()
5252
$this->assertSame('Dieser Wert sollte grOEsser oder gleich', (string)$s->ascii([$rule]));
5353
}
5454

55-
publicfunctionprovideCreateFromCodePoint():array
55+
publicstaticfunctionprovideCreateFromCodePoint():array
5656
{
5757
return [
5858
['', []],

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp