@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | // TODO: Cleanup (avoid repetition) |
| 147 | 147 | // Try to create new Instance of Handler and return it |
| 148 | 148 | try { |
| 149 | - $oHandler = new $oHandler($locale); |
|
| 149 | + $oHandler = new $oHandler($locale); |
|
| 150 | 150 | } |
| 151 | 151 | catch (TranslationCacheNotFound $exception) { |
| 152 | 152 | // Log error and fallback procedure |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | private function replaceParameter ($translation, $parameters) { |
| 232 | 232 | |
| 233 | 233 | // Go through each specified Parameter and replace its placeholder "{$key}" |
| 234 | - foreach ($parameters as $key => $parameter) { |
|
| 234 | + foreach ($parameters as $key => $parameter) { |
|
| 235 | 235 | // TODO: Make Prefix and Suffix configurable |
| 236 | 236 | // If the string (e.g "{name}") is not specified within the "parameters" array it won't be replaced! |
| 237 | 237 | $translation = str_replace("{".$key."}", $parameter, $translation); |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | $translations = new TranslationIdentifier(); |
| 62 | 62 | $translations = $translations->leftJoin('translations', function ($join) { |
| 63 | 63 | $join->on( 'translation_identifiers.id', '=', 'translations.translation_identifier_id') |
| 64 | - ->where('locale', $this->locale); |
|
| 64 | + ->where('locale', $this->locale); |
|
| 65 | 65 | })->get(); |
| 66 | 66 | |
| 67 | 67 | |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | |
| 64 | 64 | // If a Group is defined just get the translations from that group |
| 65 | 65 | try { |
| 66 | - $trans_identifier = json_decode(file_get_contents($locale_dir.'/'.$group.'.json'), true); |
|
| 66 | + $trans_identifier = json_decode(file_get_contents($locale_dir.'/'.$group.'.json'), true); |
|
| 67 | 67 | } |
| 68 | 68 | catch (\ErrorException $e) { |
| 69 | 69 | throw new TranslationCacheNotFound("The Translation cache file '".$locale_dir.'/'.$group.'.json'."' could not be found!"); |
@@ -33,12 +33,12 @@ |
||
| 33 | 33 | }); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - /** |
|
| 37 | - * Strip the parentheses from the given expression. |
|
| 38 | - * |
|
| 39 | - * @param string $expression |
|
| 40 | - * @return string |
|
| 41 | - */ |
|
| 36 | + /** |
|
| 37 | + * Strip the parentheses from the given expression. |
|
| 38 | + * |
|
| 39 | + * @param string $expression |
|
| 40 | + * @return string |
|
| 41 | + */ |
|
| 42 | 42 | public function stripParentheses($expression) |
| 43 | 43 | { |
| 44 | 44 | if (Str::startsWith($expression, '(')) { |