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

Appearance settings

Commit 47846bb

Browse filesBrowse files
committed
CS
1 parent 3acaab8 commit 47846bb
Copy full SHA for 47846bb

File tree

2 files changed

+5
-5
lines changed
Filter options

2 files changed

+5
-5
lines changed

‎src/Symfony/Component/Translation/Command/IntlConvertCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Command/IntlConvertCommand.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
6868

6969
// Define Root Paths
7070
$transPaths = $kernel->getProjectDir().'/translations';
71-
if (null !== $path) {
71+
if (null !== $path) {
7272
$transPaths = $path;
7373
}
7474

‎src/Symfony/Component/Translation/Util/IntlMessageConverter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Util/IntlMessageConverter.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public static function convert(string $message): string
2323
{
2424
$array = self::getMessageArray($message);
2525

26-
if (\count($array) === 1 && isset($array[0])) {
27-
return preg_replace('|%(.*?)%|s','{$1}', $message);
26+
if (1 === \count($array) && isset($array[0])) {
27+
return preg_replace('|%(.*?)%|s', '{$1}', $message);
2828
}
2929

3030
$icu = self::buildIcuString($array);
@@ -105,8 +105,8 @@ private static function buildIcuString(array $data): string
105105
{
106106
$icu = "{ COUNT, plural,\n";
107107
foreach ($data as $key => $message) {
108-
$message = strtr($message, ['%count%'=>'#']);
109-
$message = preg_replace('|%(.*?)%|s','{$1}', $message);
108+
$message = strtr($message, array('%count%' => '#'));
109+
$message = preg_replace('|%(.*?)%|s', '{$1}', $message);
110110
$icu .= sprintf(" %s {%s}\n", $key, $message);
111111
}
112112
$icu .= '}';

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.