Skip to content

Commit 6bd135a

Browse files
Various CS fixes
1 parent 8e740e1 commit 6bd135a

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

Countries.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ public static function getAlpha3Names(?string $displayLocale = null): array
234234
public static function withUserAssigned(?bool $withUserAssigned = null): bool
235235
{
236236
if (null === $withUserAssigned) {
237-
return self::$withUserAssigned ??= filter_var($_ENV['SYMFONY_INTL_WITH_USER_ASSIGNED'] ?? $_SERVER['SYMFONY_INTL_WITH_USER_ASSIGNED'] ?? getenv('SYMFONY_INTL_WITH_USER_ASSIGNED'), FILTER_VALIDATE_BOOLEAN);
237+
return self::$withUserAssigned ??= filter_var($_ENV['SYMFONY_INTL_WITH_USER_ASSIGNED'] ?? $_SERVER['SYMFONY_INTL_WITH_USER_ASSIGNED'] ?? getenv('SYMFONY_INTL_WITH_USER_ASSIGNED'), \FILTER_VALIDATE_BOOLEAN);
238238
}
239239

240240
return self::$withUserAssigned = $withUserAssigned;

Tests/CountriesTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -780,10 +780,10 @@ class CountriesTest extends ResourceBundleTestCase
780780

781781
public function testAllGettersGenerateTheSameDataSetCount()
782782
{
783-
$alpha2Count = count(Countries::getCountryCodes());
784-
$alpha3Count = count(Countries::getAlpha3Codes());
785-
$numericCodesCount = count(Countries::getNumericCodes());
786-
$namesCount = count(Countries::getNames());
783+
$alpha2Count = \count(Countries::getCountryCodes());
784+
$alpha3Count = \count(Countries::getAlpha3Codes());
785+
$numericCodesCount = \count(Countries::getNumericCodes());
786+
$namesCount = \count(Countries::getNames());
787787

788788
// we base all on Name count since it is the first to be generated
789789
$this->assertEquals($namesCount, $alpha2Count, 'Alpha 2 count does not match');

Tests/CountriesWithUserAssignedTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -797,11 +797,11 @@ public static function tearDownAfterClass(): void
797797

798798
public function testAllGettersGenerateTheSameDataSetCount(): void
799799
{
800-
$expected = count(self::COUNTRIES_WITH_USER_ASSIGNED);
801-
$alpha2Count = count(Countries::getCountryCodes());
802-
$alpha3Count = count(Countries::getAlpha3Codes());
803-
$numericCodesCount = count(Countries::getNumericCodes());
804-
$namesCount = count(Countries::getNames());
800+
$expected = \count(self::COUNTRIES_WITH_USER_ASSIGNED);
801+
$alpha2Count = \count(Countries::getCountryCodes());
802+
$alpha3Count = \count(Countries::getAlpha3Codes());
803+
$numericCodesCount = \count(Countries::getNumericCodes());
804+
$namesCount = \count(Countries::getNames());
805805

806806
// we compare against our test list to check that optional user assigned is included
807807
$this->assertEquals($expected, $namesCount, 'Names count does not match');
@@ -832,7 +832,7 @@ public function testGetNames($displayLocale): void
832832
}
833833

834834
/**
835-
* This test is for backward compatibility. testGetNames already checks `XK` is included
835+
* This test is for backward compatibility; testGetNames already checks `XK` is included.
836836
*
837837
* @dataProvider provideLocaleAliases
838838
*/
@@ -849,7 +849,7 @@ public function testGetNamesSupportsAliases($alias, $ofLocale): void
849849
}
850850

851851
/**
852-
* This test is for backward compatibility. testGetNames already checks `XK` is included
852+
* This test is for backward compatibility; testGetNames already checks `XK` is included.
853853
*
854854
* @dataProvider provideLocales
855855
*/

Tests/TimezonesTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Intl\Tests;
1313

14-
use Symfony\Component\Intl\Countries;
1514
use Symfony\Component\Intl\Exception\MissingResourceException;
1615
use Symfony\Component\Intl\Timezones;
1716
use Symfony\Component\Intl\Util\IntlTestHelper;

0 commit comments

Comments
 (0)