8000 fabpot.io style fix · symfony/symfony@f7e70b1 · GitHub
[go: up one dir, main page]

Skip to content

Commit f7e70b1

Browse files
author
Peter Culka
committed
fabpot.io style fix
1 parent 7ac0638 commit f7e70b1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Symfony/Component/Translation/Bridge/Crowdin/CrowdinProvider.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,17 @@ public function read(array $domains, array $locales): TranslatorBag
111111

112112
$localeLanguageMap = [];
113113
foreach ($this->listLanguages($locales) as $language) {
114-
if (in_array($language['data']['locale'], $locales)) {
114+
if (\in_array($language['data']['locale'], $locales)) {
115115
$localeLanguageMap[$language['data']['locale']] = $language['data']['id'];
116-
} elseif (in_array($language['data']['id'], $locales)) {
116+
} elseif (\in_array($language['data']['id'], $locales)) {
117117
// try fallback to language id
118118
$localeLanguageMap[$language['data']['id']] = $language['data']['id'];
119119
}
120120
}
121121

122-
if (count($localeLanguageMap) !== count($locales)) {
122+
if (\count($localeLanguageMap) !== \count($locales)) {
123123
$message = sprintf(
124-
"Unable to find all requested locales in Crowdin: \"%s\" not found.",
124+
'Unable to find all requested locales in Crowdin: "%s" not found.',
125125
implode(', ', array_diff($locales, array_keys($localeLanguageMap)))
126126
);
127127
$this->logger->error($message);
@@ -358,12 +358,12 @@ private function listLanguages(): array
358358
// cannot query by locales, we need to fetch all and filter out the relevant ones
359359
$response = $this->client->request('GET', '../../languages', [
360360
'query' => [
361-
'limit' => 500
362-
]
361+
'limit' => 500,
362+
],
363363
]);
364364

365365
if (200 !== $response->getStatusCode()) {
366-
throw new ProviderException(sprintf('Unable to list set languages.'), $response);
366+
throw new ProviderException('Unable to list set languages.', $response);
367367
}
368368

369369
return $response->toArray()['data'];

0 commit comments

Comments
 (0)
0