Completed
Pull Request — master (#32)
by Josh
47:12 queued 40:46
created
Http/backendRoutes.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,12 +4,12 @@
 block discarded – undo
4 4
 
5 5
 /** @var Router $router */
6 6
 
7
-$router->group(['prefix' =>'/translation'], function (Router $router) {
8
-    $router->bind('translations', function ($id) {
7
+$router->group([ 'prefix' =>'/translation' ], function(Router $router) {
8
+    $router->bind('translations', function($id) {
9 9
         return \Modules\Translation\Entities\TranslationTranslation::find($id);
10 10
     });
11
-    $router->get('translations', ['uses' => 'TranslationController@index', 'as' => 'admin.translation.translation.index', ]);
12
-    $router->get('translations/update/{translations}', ['uses' => 'TranslationController@update', 'as' => 'admin.translation.translation.update', ]);
13
-    $router->get('translations/export', ['uses' => 'TranslationController@export', 'as' => 'admin.translation.translation.export', ]);
14
-    $router->post('translations/import', ['uses' => 'TranslationController@import', 'as' => 'admin.translation.translation.import', ]);
11
+    $router->get('translations', [ 'uses' => 'TranslationController@index', 'as' => 'admin.translation.translation.index', ]);
12
+    $router->get('translations/update/{translations}', [ 'uses' => 'TranslationController@update', 'as' => 'admin.translation.translation.update', ]);
13
+    $router->get('translations/export', [ 'uses' => 'TranslationController@export', 'as' => 'admin.translation.translation.export', ]);
14
+    $router->post('translations/import', [ 'uses' => 'TranslationController@import', 'as' => 'admin.translation.translation.import', ]);
15 15
 });
Please login to merge, or discard this patch.
Http/apiRoutes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,6 +4,6 @@
 block discarded – undo
4 4
 
5 5
 /** @var $router Router */
6 6
 
7
-$router->post('translation/update', ['uses' => 'TranslationController@update', 'as' => 'api.translation.translations.update', ]);
8
-$router->post('translation/clearCache', ['uses' => 'TranslationController@clearCache', 'as' => 'api.translation.translations.clearCache']);
9
-$router->post('translation/revisions', ['uses' => 'TranslationController@revisions', 'as' => 'api.translation.translations.revisions']);
7
+$router->post('translation/update', [ 'uses' => 'TranslationController@update', 'as' => 'api.translation.translations.update', ]);
8
+$router->post('translation/clearCache', [ 'uses' => 'TranslationController@clearCache', 'as' => 'api.translation.translations.clearCache' ]);
9
+$router->post('translation/revisions', [ 'uses' => 'TranslationController@revisions', 'as' => 'api.translation.translations.revisions' ]);
Please login to merge, or discard this patch.
Services/TranslationsService.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
         foreach ($allFileTranslations as $locale => $fileTranslation) {
34 34
             foreach ($fileTranslation as $key => $translation) {
35 35
                 if (is_string($translation) === false) {
36
-                    unset($allFileTranslations[$locale][$key]);
36
+                    unset($allFileTranslations[ $locale ][ $key ]);
37 37
                 }
38
-                if (isset($allDatabaseTranslations[$locale][$key])) {
39
-                    $allFileTranslations[$locale][$key] = $allDatabaseTranslations[$locale][$key];
40
-                    unset($allDatabaseTranslations[$locale][$key]);
38
+                if (isset($allDatabaseTranslations[ $locale ][ $key ])) {
39
+                    $allFileTranslations[ $locale ][ $key ] = $allDatabaseTranslations[ $locale ][ $key ];
40
+                    unset($allDatabaseTranslations[ $locale ][ $key ]);
41 41
                 }
42 42
             }
43 43
         }
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
         $activeLocales = $this->getActiveLocales();
58 58
 
59 59
         foreach ($allFileTranslations as $locale => $value) {
60
-            if (! in_array($locale, $activeLocales)) {
61
-                unset($allFileTranslations[$locale]);
60
+            if (!in_array($locale, $activeLocales)) {
61
+                unset($allFileTranslations[ $locale ]);
62 62
             }
63 63
         }
64 64
     }
@@ -69,10 +69,10 @@  discard block
 block discarded – undo
69 69
      */
70 70
     private function getActiveLocales()
71 71
     {
72
-        $locales = [];
72
+        $locales = [ ];
73 73
 
74 74
         foreach (config('laravellocalization.supportedLocales') as $locale => $translation) {
75
-            $locales[] = $locale;
75
+            $locales[ ] = $locale;
76 76
         }
77 77
 
78 78
         return $locales;
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     {
87 87
         foreach ($allDatabaseTranslations as $locale => $group) {
88 88
             foreach ($group as $key => $value) {
89
-                $allFileTranslations[$locale][$key] = $value;
89
+                $allFileTranslations[ $locale ][ $key ] = $value;
90 90
             }
91 91
         }
92 92
     }
Please login to merge, or discard this patch.