@@ -49,7 +49,7 @@ |
||
| 49 | 49 | * @param $locale |
| 50 | 50 | */ |
| 51 | 51 | function __construct($locale) { |
| 52 | - $this->locale = $locale; |
|
| 52 | + $this->locale = $locale; |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** |
@@ -16,21 +16,27 @@ |
||
| 16 | 16 | * |
| 17 | 17 | * Class TranslationNotFoundException |
| 18 | 18 | */ |
| 19 | -class TranslationNotFoundException extends \Exception {} |
|
| 19 | +class TranslationNotFoundException extends \Exception |
|
| 20 | +{ |
|
| 21 | +} |
|
| 20 | 22 | |
| 21 | 23 | /** |
| 22 | 24 | * Custom Exception to distinguish if the Translation Identifier was not found in Cache but could be in DB |
| 23 | 25 | * |
| 24 | 26 | * Class TranslationNotInCacheException |
| 25 | 27 | */ |
| 26 | -class TranslationNotInCacheException extends TranslationNotFoundException {} |
|
| 28 | +class TranslationNotInCacheException extends TranslationNotFoundException |
|
| 29 | +{ |
|
| 30 | +} |
|
| 27 | 31 | |
| 28 | 32 | /** |
| 29 | 33 | * Custom Exception thrown when a cache file could not be found |
| 30 | 34 | * |
| 31 | 35 | * Class TranslationCacheNotFound |
| 32 | 36 | */ |
| 33 | -class TranslationCacheNotFound extends \Exception {} |
|
| 37 | +class TranslationCacheNotFound extends \Exception |
|
| 38 | +{ |
|
| 39 | +} |
|
| 34 | 40 | |
| 35 | 41 | /** |
| 36 | 42 | * Interface HandlerInterface |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | $locale_dir = TranslatorFacade::getConfigValue('cache_path') . $this->locale; |
| 61 | 61 | |
| 62 | 62 | try { |
| 63 | - $trans_identifier = json_decode(file_get_contents($locale_dir . '/' . $group . '.json'), true); |
|
| 63 | + $trans_identifier = json_decode(file_get_contents($locale_dir . '/' . $group . '.json'), true); |
|
| 64 | 64 | } catch (\ErrorException $e) { |
| 65 | 65 | throw new TranslationCacheNotFound("The Translation cache file '" . $locale_dir . '/' . $group . '.json' . "' could not be found!"); |
| 66 | 66 | } |
@@ -128,12 +128,12 @@ |
||
| 128 | 128 | return $translation; |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | - /** |
|
| 132 | - * Sets the Handler |
|
| 133 | - * |
|
| 134 | - * @param $locale |
|
| 135 | - * @return DefaultHandler |
|
| 136 | - */ |
|
| 131 | + /** |
|
| 132 | + * Sets the Handler |
|
| 133 | + * |
|
| 134 | + * @param $locale |
|
| 135 | + * @return DefaultHandler |
|
| 136 | + */ |
|
| 137 | 137 | protected function createHandler($locale) { |
| 138 | 138 | $handler_class = $this->config['handler']; |
| 139 | 139 | |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | |
| 140 | 140 | $translation_identifier = $translation_identifiers->find($id); |
| 141 | 141 | |
| 142 | - $translation_identifier->description = isset($identifier['description']) ? $identifier['description'] : null; |
|
| 142 | + $translation_identifier->description = isset($identifier['description']) ? $identifier['description'] : null; |
|
| 143 | 143 | |
| 144 | 144 | $translation_identifier->save(); |
| 145 | 145 | } |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | * @param $state string 'enabled|disabled' |
| 160 | 160 | * @return \Illuminate\Http\RedirectResponse |
| 161 | 161 | */ |
| 162 | - public function changeLiveMode ($state) { |
|
| 162 | + public function changeLiveMode($state) { |
|
| 163 | 163 | if ($state == 'enable') { |
| 164 | 164 | session(['translation_live_mode' => true]); |
| 165 | 165 | } else { |