Skip to content

Commit

Permalink
Merge pull request #1208: Apply risky Code Style rules
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralbot committed Jan 24, 2025
1 parent 8991da1 commit 63e5713
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function transChoice(
throw new PluralizationException($e->getMessage(), $e->getCode(), $e);
}

if (empty($parameters['n']) && is_numeric($number)) {
if (empty($parameters['n']) && \is_numeric($number)) {
$parameters['n'] = $number;
}

Expand Down
8 changes: 4 additions & 4 deletions tests/LoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public function testGetLocales(): void

$compared = $loader->getLocales();
$shouldBe = ['en', 'ru'];
sort($shouldBe);
sort($compared);
\sort($shouldBe);
\sort($compared);

self::assertSame($shouldBe, $compared);
}
Expand All @@ -60,8 +60,8 @@ public function testGetLocalesWithAdditionalDirectories(): void

$compared = $loader->getLocales();
$shouldBe = ['en', 'ru', 'fr'];
sort($shouldBe);
sort($compared);
\sort($shouldBe);
\sort($compared);

self::assertSame($shouldBe, $compared);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/PluralizeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function testInterpolation(): void
'c' => 3,
]));

self::assertSame('2,220 dogs', $this->translator()->transChoice('{n} dog|{n} dogs', 2, ['n' => number_format(2220)]));
self::assertSame('2,220 dogs', $this->translator()->transChoice('{n} dog|{n} dogs', 2, ['n' => \number_format(2220)]));
}

public function testRussian(): void
Expand Down

0 comments on commit 63e5713

Please sign in to comment.