We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e9a001 commit 17d912eCopy full SHA for 17d912e
src/Utility/Language.php
@@ -91,7 +91,8 @@ public static function getTranslationsByLanguage(string $language): array
91
$decoded = \json_decode($fileContent, true);
92
93
if (\json_last_error() !== \JSON_ERROR_NONE) {
94
- throw new \Exception(\sprintf('Fail to decode JSON file (code %d): %s', \json_last_error(), \realpath($filePath)));
+ $msg = \sprintf('Fail to decode JSON file (code %d): %s', \json_last_error(), \realpath($filePath));
95
+ throw new \Exception($msg); // workaround single-line throw + 120-char limit
96
}
97
98
return (array) $decoded;
0 commit comments