Completed
Push — master ( 132934...c8ddaf )
by Nicolas
04:39
created
Services/TranslationsWriter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     private function makeTree(TranslationGroup $translations)
79 79
     {
80
-        $tree = [];
80
+        $tree = [ ];
81 81
 
82 82
         foreach ($translations->allRaw() as $locale => $translation) {
83 83
             foreach ($translation as $key => $trans) {
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                 $fileName = $this->getFileNameFrom($key);
86 86
                 $key = str_replace($moduleName . '::' . $fileName . '.', '', $key);
87 87
 
88
-                array_set($tree[$locale][$moduleName][$fileName], $key, $trans);
88
+                array_set($tree[ $locale ][ $moduleName ][ $fileName ], $key, $trans);
89 89
             }
90 90
         }
91 91
 
Please login to merge, or discard this patch.
Sidebar/SidebarExtender.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@
 block discarded – undo
32 32
         if (false === config('asgard.translation.config.translations-gui')) {
33 33
             return $menu;
34 34
         }
35
-        $menu->group(trans('core::sidebar.content'), function (Group $group) {
36
-            $group->item(trans('translation::translations.title.translations'), function (Item $item) {
35
+        $menu->group(trans('core::sidebar.content'), function(Group $group) {
36
+            $group->item(trans('translation::translations.title.translations'), function(Item $item) {
37 37
                 $item->icon('fa fa-globe');
38 38
                 $item->weight(10);
39 39
                 $item->route('admin.translation.translation.index');
Please login to merge, or discard this patch.
ValueObjects/TranslationGroup.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@
 block discarded – undo
20 20
      */
21 21
     private function reArrangeTranslations(array $translationsRaw)
22 22
     {
23
-        $translations = [];
23
+        $translations = [ ];
24 24
 
25 25
         foreach ($translationsRaw as $locale => $translationGroup) {
26 26
             foreach ($translationGroup as $key => $translation) {
27
-                $translations[$key][$locale] = $translation;
27
+                $translations[ $key ][ $locale ] = $translation;
28 28
             }
29 29
         }
30 30
 
Please login to merge, or discard this patch.
Services/Translator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      * @param  bool  $fallback
16 16
      * @return string
17 17
      */
18
-    public function get($key, array $replace = [], $locale = null, $fallback = true)
18
+    public function get($key, array $replace = [ ], $locale = null, $fallback = true)
19 19
     {
20 20
         $translationRepository = app(TranslationRepository::class);
21 21
         if ($translation = $translationRepository->findByKeyAndLocale($key, $locale)) {
Please login to merge, or discard this patch.
Database/Migrations/2013_04_09_062329_create_revisions_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('revisions', function (Blueprint $table) {
15
+        Schema::create('revisions', function(Blueprint $table) {
16 16
             $table->increments('id');
17 17
             $table->string('revisionable_type');
18 18
             $table->integer('revisionable_id');
Please login to merge, or discard this patch.
Repositories/File/FileTranslationRepository.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $files = $this->getTranslationFilenamesFromPaths($this->loader->paths());
31 31
 
32
-        $translations = [];
32
+        $translations = [ ];
33 33
 
34 34
         foreach ($files as $locale => $files) {
35 35
             foreach ($files as $namespace => $file) {
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
                 $trans = array_dot($trans);
38 38
 
39 39
                 foreach ($trans as $key => $value) {
40
-                    $translations[$locale]["{$namespace}.{$key}"] = $value;
40
+                    $translations[ $locale ][ "{$namespace}.{$key}" ] = $value;
41 41
                 }
42 42
             }
43 43
         }
@@ -53,17 +53,17 @@  discard block
 block discarded – undo
53 53
      */
54 54
     protected function getTranslationFilenamesFromPaths(array $paths)
55 55
     {
56
-        $files   = [];
56
+        $files   = [ ];
57 57
         $locales = config('laravellocalization.supportedLocales');
58 58
 
59 59
         foreach ($paths as $hint => $path) {
60 60
             foreach ($locales as $locale => $language) {
61 61
                 foreach ($this->finder->glob("{$path}/{$locale}/*.php") as $file) {
62
-                    $category = str_replace(["$path/", ".php", "{$locale}/"], "", $file);
62
+                    $category = str_replace([ "$path/", ".php", "{$locale}/" ], "", $file);
63 63
                     $category = str_replace("/", ".", $category);
64 64
                     $category = !is_int($hint) ? "{$hint}::{$category}" : $category;
65 65
 
66
-                    $files[$locale][$category] = $file;
66
+                    $files[ $locale ][ $category ] = $file;
67 67
                 }
68 68
             }
69 69
         }
Please login to merge, or discard this patch.
Services/TranslationLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
     public function paths()
10 10
     {
11 11
         return array_merge(
12
-            [$this->path],
12
+            [ $this->path ],
13 13
             $this->hints
14 14
         );
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
@@ -3,6 +3,6 @@
 block discarded – undo
3 3
 use Illuminate\Routing\Router;
4 4
 
5 5
 /** @var $router Router */
6
-post('translation/update', ['uses' => 'TranslationController@update', 'as' => 'api.translation.translations.update', ]);
7
-post('translation/clearCache', ['uses' => 'TranslationController@clearCache', 'as' => 'api.translation.translations.clearCache']);
8
-post('translation/revisions', ['uses' => 'TranslationController@revisions', 'as' => 'api.translation.translations.revisions']);
6
+post('translation/update', [ 'uses' => 'TranslationController@update', 'as' => 'api.translation.translations.update', ]);
7
+post('translation/clearCache', [ 'uses' => 'TranslationController@clearCache', 'as' => 'api.translation.translations.clearCache' ]);
8
+post('translation/revisions', [ 'uses' => 'TranslationController@revisions', 'as' => 'api.translation.translations.revisions' ]);
Please login to merge, or discard this patch.
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
-    get('translations', ['uses' => 'TranslationController@index', 'as' => 'admin.translation.translation.index', ]);
12
-    get('translations/update/{translations}', ['uses' => 'TranslationController@update', 'as' => 'admin.translation.translation.update', ]);
13
-    get('translations/export', ['uses' => 'TranslationController@export', 'as' => 'admin.translation.translation.export', ]);
14
-    post('translations/import', ['uses' => 'TranslationController@import', 'as' => 'admin.translation.translation.import', ]);
11
+    get('translations', [ 'uses' => 'TranslationController@index', 'as' => 'admin.translation.translation.index', ]);
12
+    get('translations/update/{translations}', [ 'uses' => 'TranslationController@update', 'as' => 'admin.translation.translation.update', ]);
13
+    get('translations/export', [ 'uses' => 'TranslationController@export', 'as' => 'admin.translation.translation.export', ]);
14
+    post('translations/import', [ 'uses' => 'TranslationController@import', 'as' => 'admin.translation.translation.import', ]);
15 15
 });
Please login to merge, or discard this patch.