Completed
Push — master ( d59a3b...064224 )
by Ricardo
13:04
created
src/Commands/FileLoaderCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
         // Load all files inside subdirectories:
107 107
         $directories = $this->files->directories($path);
108 108
         foreach ($directories as $directory) {
109
-            $directoryName = str_replace($path . '/', '', $directory);
110
-            $dirGroup      = $group . basename($directory) . '/';
109
+            $directoryName = str_replace($path.'/', '', $directory);
110
+            $dirGroup      = $group.basename($directory).'/';
111 111
             $this->loadDirectory($directory, $locale, $namespace, $dirGroup);
112 112
         }
113 113
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      */
130 130
     public function loadFile($file, $locale, $namespace = '*', $group = '')
131 131
     {
132
-        $group        = $group . basename($file, '.php');
132
+        $group        = $group.basename($file, '.php');
133 133
         $translations = $this->files->getRequire($file);
134 134
         $this->translationRepository->loadArray($translations, $locale, $group, $namespace, $locale == $this->defaultLocale);
135 135
     }
Please login to merge, or discard this patch.
src/Repositories/TranslationRepository.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
             ->get()
242 242
             ->keyBy('item')
243 243
             ->map(
244
-                function ($translation) {
244
+                function($translation) {
245 245
                     return $translation['text'];
246 246
                 }
247 247
             )
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
         foreach ($elements as $element) {
288 288
             if ($element) {
289 289
                 $query = $query->where(
290
-                    function ($query) use ($element) {
290
+                    function($query) use ($element) {
291 291
                         $query->where('group', 'like', "%{$element}%")->orWhere('item', 'like', "%{$element}%")->orWhere('text', 'like', "%{$element}%");
292 292
                     }
293 293
                 );
@@ -368,10 +368,10 @@  discard block
 block discarded – undo
368 368
 
369 369
         return $this->model
370 370
             ->newQuery()
371
-            ->select($table . '.text')
371
+            ->select($table.'.text')
372 372
             ->from($table)
373 373
             ->leftJoin(
374
-                "{$table} as e", function ($join) use ($table, $text, $textLocale) {
374
+                "{$table} as e", function($join) use ($table, $text, $textLocale) {
375 375
                     $join->on('e.namespace', '=', "{$table}.namespace")
376 376
                         ->on('e.group', '=', "{$table}.group")
377 377
                         ->on('e.item', '=', "{$table}.item");
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
         return $this->database->table("$table as $table")
477 477
             ->select("$table.id")
478 478
             ->leftJoin(
479
-                "$table as e", function (JoinClause $query) use ($table, $locale) {
479
+                "$table as e", function(JoinClause $query) use ($table, $locale) {
480 480
                     $query->on('e.namespace', '=', "$table.namespace")
481 481
                         ->on('e.group', '=', "$table.group")
482 482
                         ->on('e.item', '=', "$table.item")
Please login to merge, or discard this patch.
src/Routes/ResourceRegistrar.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         // Remove segments from group prefix that are equal to one of the available locales:
43 43
         $groupSegments = explode('/', $this->router->getLastGroupPrefix());
44 44
         $groupSegments = array_filter(
45
-            $groupSegments, function ($segment) use ($availableLocales) {
45
+            $groupSegments, function($segment) use ($availableLocales) {
46 46
                 return !in_array($segment, $availableLocales);
47 47
             }
48 48
         );
Please login to merge, or discard this patch.
src/TranslationServiceProvider.php 2 patches
Switch Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -123,25 +123,25 @@
 block discarded – undo
123 123
                 $source        = $app['config']->get('translator.source');
124 124
 
125 125
                 switch ($source) {
126
-                case 'mixed':
127
-                    $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath() . '/resources/lang');
128
-                    $fileLoader        = new FileLoader($defaultLocale, $laravelFileLoader);
129
-                    $databaseLoader    = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class));
130
-                    $loader            = new MixedLoader($defaultLocale, $fileLoader, $databaseLoader);
131
-break;
132
-                case 'mixed_db':
133
-                    $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath() . '/resources/lang');
134
-                    $fileLoader        = new FileLoader($defaultLocale, $laravelFileLoader);
135
-                    $databaseLoader    = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class));
136
-                    $loader            = new MixedLoader($defaultLocale, $databaseLoader, $fileLoader);
137
-break;
138
-                case 'database':
139
-                    $loader = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class));
140
-break;
141
-                default:case 'files':
126
+                    case 'mixed':
142 127
                         $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath() . '/resources/lang');
143
-                        $loader            = new FileLoader($defaultLocale, $laravelFileLoader);
144
-break;
128
+                        $fileLoader        = new FileLoader($defaultLocale, $laravelFileLoader);
129
+                        $databaseLoader    = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class));
130
+                        $loader            = new MixedLoader($defaultLocale, $fileLoader, $databaseLoader);
131
+    break;
132
+                    case 'mixed_db':
133
+                        $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath() . '/resources/lang');
134
+                        $fileLoader        = new FileLoader($defaultLocale, $laravelFileLoader);
135
+                        $databaseLoader    = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class));
136
+                        $loader            = new MixedLoader($defaultLocale, $databaseLoader, $fileLoader);
137
+    break;
138
+                    case 'database':
139
+                        $loader = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class));
140
+    break;
141
+                    default:case 'files':
142
+                            $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath() . '/resources/lang');
143
+                            $loader            = new FileLoader($defaultLocale, $laravelFileLoader);
144
+    break;
145 145
                 }
146 146
                 if ($app['config']->get('translator.cache.enabled')) {
147 147
                     $loader = new CacheLoader($defaultLocale, $app['translation.cache.repository'], $loader, $app['config']->get('translator.cache.timeout'));
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
     {
54 54
         Schema::defaultStringLength(191);
55 55
 
56
-        $this->loadMigrationsFrom(__DIR__ . '/../database/migrations/');
56
+        $this->loadMigrationsFrom(__DIR__.'/../database/migrations/');
57 57
         $this->publishes(
58 58
             [
59
-            __DIR__ . '/../config/translator.php' => config_path('translator.php'),
60
-            __DIR__ . '/../config/translation.php' => config_path('translation.php'),
59
+            __DIR__.'/../config/translator.php' => config_path('translator.php'),
60
+            __DIR__.'/../config/translation.php' => config_path('translation.php'),
61 61
             ]
62 62
         );
63 63
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
          */
69 69
         Route::group([
70 70
             'namespace' => '\Translation\Http\Controllers',
71
-        ], function (/**$router**/) {
71
+        ], function(/**$router**/) {
72 72
             require __DIR__.'/../routes/web.php';
73 73
         });
74 74
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
          * Provider Antigo
80 80
          */
81 81
         Blade::directive(
82
-            't', function ($args) {
82
+            't', function($args) {
83 83
                 return "<?php echo App::make('translation')->translate{$args}; ?>";
84 84
             }
85 85
         );
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function register()
97 97
     {
98
-        $this->mergeConfigFrom(__DIR__ . '/../config/translator.php', 'translator');
99
-        $this->mergeConfigFrom(__DIR__ . '/../config/translation.php', 'translation');
98
+        $this->mergeConfigFrom(__DIR__.'/../config/translator.php', 'translator');
99
+        $this->mergeConfigFrom(__DIR__.'/../config/translation.php', 'translation');
100 100
 
101 101
         parent::register();
102 102
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
         // Bind translation to the IoC.
106 106
         $this->app->bind(
107
-            'translation', function (Application $app) {
107
+            'translation', function(Application $app) {
108 108
                 return new \Translation\Services\Translation($app);
109 109
             }
110 110
         );
@@ -152,20 +152,20 @@  discard block
 block discarded – undo
152 152
     {
153 153
         $app = $this->app;
154 154
         $this->app->singleton(
155
-            'translation.loader', function ($app) {
155
+            'translation.loader', function($app) {
156 156
                 $defaultLocale = $app['config']->get('app.locale');
157 157
                 $loader        = null;
158 158
                 $source        = $app['config']->get('translator.source');
159 159
 
160 160
                 switch ($source) {
161 161
                 case 'mixed':
162
-                    $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath() . '/resources/lang');
162
+                    $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath().'/resources/lang');
163 163
                     $fileLoader        = new FileLoader($defaultLocale, $laravelFileLoader);
164 164
                     $databaseLoader    = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class));
165 165
                     $loader            = new MixedLoader($defaultLocale, $fileLoader, $databaseLoader);
166 166
 break;
167 167
                 case 'mixed_db':
168
-                    $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath() . '/resources/lang');
168
+                    $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath().'/resources/lang');
169 169
                     $fileLoader        = new FileLoader($defaultLocale, $laravelFileLoader);
170 170
                     $databaseLoader    = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class));
171 171
                     $loader            = new MixedLoader($defaultLocale, $databaseLoader, $fileLoader);
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
                     $loader = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class));
175 175
 break;
176 176
                 default:case 'files':
177
-                        $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath() . '/resources/lang');
177
+                        $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath().'/resources/lang');
178 178
                         $loader            = new FileLoader($defaultLocale, $laravelFileLoader);
179 179
 break;
180 180
                 }
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
     public function registerCacheRepository()
195 195
     {
196 196
         $this->app->singleton(
197
-            'translation.cache.repository', function ($app) {
197
+            'translation.cache.repository', function($app) {
198 198
                 $cacheStore = $app['cache']->getStore();
199 199
                 return CacheRepositoryFactory::make($cacheStore, $app['config']->get('translator.cache.suffix'));
200 200
             }
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $defaultLocale         = $app['config']->get('app.locale');
213 213
         $languageRepository    = $app->make(LanguageRepository::class);
214 214
         $translationRepository = $app->make(TranslationRepository::class);
215
-        $translationsPath      = $app->basePath() . '/resources/lang';
215
+        $translationsPath      = $app->basePath().'/resources/lang';
216 216
         $command               = new FileLoaderCommand($languageRepository, $translationRepository, $app['files'], $translationsPath, $defaultLocale);
217 217
 
218 218
         $this->app['command.translator:load'] = $command;
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
     protected function bootTranslatorCollectionMacros()
238 238
     {
239 239
         Collection::macro(
240
-            'translate', function () {
240
+            'translate', function() {
241 241
                 $transtors = [];
242 242
 
243 243
                 foreach ($this->all() as $item) {
Please login to merge, or discard this patch.
src/Tokens/GoogleTokenGenerator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     private function unsignedRightShift($a, $b)
113 113
     {
114 114
         if ($b >= 32 || $b < -32) {
115
-            $m = (int)($b / 32);
115
+            $m = (int) ($b / 32);
116 116
             $b = $b - ($m * 32);
117 117
         }
118 118
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     private function JS_charCodeAt($str, $index)
148 148
     {
149 149
         $utf16 = mb_convert_encoding($str, 'UTF-16LE', 'UTF-8');
150
-        return ord($utf16[$index*2]) + (ord($utf16[$index*2+1]) << 8);
150
+        return ord($utf16[$index * 2]) + (ord($utf16[$index * 2 + 1]) << 8);
151 151
     }
152 152
 
153 153
     /**
@@ -160,6 +160,6 @@  discard block
 block discarded – undo
160 160
     private function JS_length($str)
161 161
     {
162 162
         $utf16 = mb_convert_encoding($str, 'UTF-16LE', 'UTF-8');
163
-        return strlen($utf16)/2;
163
+        return strlen($utf16) / 2;
164 164
     }
165 165
 }
Please login to merge, or discard this patch.
resources/lang/al/form.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
     'field_password_keep'          => 'Lëreni bosh për të mbajtur të njëjtën',
5 5
     'field_select_dd_relationship' => 'Sigurohuni që të konfiguroni marrëdhënien e '
6 6
     .'duhur në metodën e metodës së klasa e klasës.',
7
-                                      'the :class class.',
7
+                                        'the :class class.',
8 8
     'type_checkbox'       => 'Kutia e Kontrollit',
9 9
     'type_codeeditor'     => 'Editor Kodi',
10 10
     'type_file'           => 'Skedar',
Please login to merge, or discard this patch.
resources/lang/id/form.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 return [
4 4
     'field_password_keep'          => 'Kosongkan untuk menggunakan data yang sama',
5 5
     'field_select_dd_relationship' => 'Pastikan untuk mengatur relationship yang benar pada memthod :method dari '.
6
-                                      'class :class .',
6
+                                        'class :class .',
7 7
     'type_checkbox'       => 'Check Box',
8 8
     'type_codeeditor'     => 'Code Editor',
9 9
     'type_file'           => 'File',
Please login to merge, or discard this patch.
resources/lang/id/analytics.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@
 block discarded – undo
5 5
     'by_sessions'  => 'By sessions',
6 6
     'by_users'     => 'By users',
7 7
     'no_client_id' => 'Untuk melihat analytics kamu membutuhkan google analytics client id dan '.
8
-                                 'menambahkannya ke pengaturan dengan menggunakan key <code>google_analytics_client_id'.
9
-                                 '</code>. Dapatkan key dari Google developer console:',
8
+                                    'menambahkannya ke pengaturan dengan menggunakan key <code>google_analytics_client_id'.
9
+                                    '</code>. Dapatkan key dari Google developer console:',
10 10
     'set_view'               => 'Pilih View',
11 11
     'this_vs_last_week'      => 'Minggu ini vs Minggu lalu',
12 12
     'this_vs_last_year'      => 'Tahun ini vs Tahun lalu',
Please login to merge, or discard this patch.
resources/lang/cs/form.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 return [
4 4
     'field_password_keep'          => 'Zanechte prázdné pro zachování aktuálního hesla',
5 5
     'field_select_dd_relationship' => 'Ujistěte se, že je nastavený správný vztah pro :method metodu '.
6
-                                      'třídy :class',
6
+                                        'třídy :class',
7 7
     'type_checkbox'       => 'Check Box',
8 8
     'type_codeeditor'     => 'Code Editor',
9 9
     'type_file'           => 'File',
Please login to merge, or discard this patch.