Completed
Push — master ( 2b1500...ed3a76 )
by Avtandil
02:41
created
src/MultiLang/Console/MigrationCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
                 $this->info('Migration successfully created!');
54 54
             } else {
55 55
                 $this->error(
56
-                    'Couldn\'t create migration.'.PHP_EOL.' Check the write permissions
56
+                    'Couldn\'t create migration.' . PHP_EOL . ' Check the write permissions
57 57
                     within the database/migrations directory.'
58 58
                 );
59 59
             }
Please login to merge, or discard this patch.
src/MultiLang/MultiLangServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         );
44 44
 
45 45
         // Register blade directives
46
-        Blade::directive('t', function ($expression) {
46
+        Blade::directive('t', function($expression) {
47 47
             return "<?php echo e(t({$expression})); ?>";
48 48
         });
49 49
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $configPath = __DIR__ . '/../config/config.php';
60 60
         $this->mergeConfigFrom($configPath, 'debugbar');
61 61
 
62
-        $this->app->singleton('multilang', function ($app) {
62
+        $this->app->singleton('multilang', function($app) {
63 63
             $locale = $app->getLocale();
64 64
             $environment = $app->environment();
65 65
             $config = $app['config']->get('multilang');
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             $multilang->setLocale($locale);
75 75
 
76 76
             if ($multilang->autoSaveIsAllowed()) {
77
-                $app->terminating(function () use ($multilang) {
77
+                $app->terminating(function() use ($multilang) {
78 78
                     return $multilang->saveTexts();
79 79
                 });
80 80
             }
@@ -85,13 +85,13 @@  discard block
 block discarded – undo
85 85
         $this->app->alias('multilang', 'Longman\LaravelMultiLang\MultiLang');
86 86
 
87 87
         $this->app['command.multilang.migration'] = $this->app->share(
88
-            function () {
88
+            function() {
89 89
                 return new MigrationCommand();
90 90
             }
91 91
         );
92 92
 
93 93
         $this->app['command.multilang.texts'] = $this->app->share(
94
-            function () {
94
+            function() {
95 95
                 return new TextsCommand();
96 96
             }
97 97
         );
Please login to merge, or discard this patch.
src/helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     }
32 32
 }
33 33
 
34
-if (! function_exists('lang_redirect')) {
34
+if (!function_exists('lang_redirect')) {
35 35
     /**
36 36
      * Get an instance of the redirector.
37 37
      *
Please login to merge, or discard this patch.
src/MultiLang/MultiLang.php 1 patch
Doc Comments   +13 added lines, -2 removed lines patch added patch discarded remove patch
@@ -120,6 +120,9 @@  discard block
 block discarded – undo
120 120
         return $config;
121 121
     }
122 122
 
123
+    /**
124
+     * @param string $key
125
+     */
123 126
     public function getConfig($key = null)
124 127
     {
125 128
         if ($key === null) {
@@ -133,7 +136,6 @@  discard block
 block discarded – undo
133 136
      * Set locale and load texts
134 137
      *
135 138
      * @param  string $lang
136
-     * @param  string $default_lang
137 139
      * @param  array  $texts
138 140
      * @return void
139 141
      */
@@ -210,7 +212,7 @@  discard block
 block discarded – undo
210 212
     /**
211 213
      * Get texts
212 214
      *
213
-     * @return array
215
+     * @return string|null
214 216
      */
215 217
     public function getRedirectUrl(Request $request)
216 218
     {
@@ -242,6 +244,9 @@  discard block
 block discarded – undo
242 244
         return null;
243 245
     }
244 246
 
247
+    /**
248
+     * @return string
249
+     */
245 250
     public function detectLocale(Request $request)
246 251
     {
247 252
         $locale  = $request->segment(1);
@@ -314,6 +319,9 @@  discard block
 block discarded – undo
314 319
         return $this;
315 320
     }
316 321
 
322
+    /**
323
+     * @param string|null $lang
324
+     */
317 325
     public function loadTextsFromDatabase($lang)
318 326
     {
319 327
         $texts = $lang ? $this->db->table($this->getTableName())
@@ -334,6 +342,9 @@  discard block
 block discarded – undo
334 342
         return $texts;
335 343
     }
336 344
 
345
+    /**
346
+     * @param string $lang
347
+     */
337 348
     public function setCacheName($lang)
338 349
     {
339 350
         $this->cache_name = $this->getConfig('texts_table') . '_' . $lang;
Please login to merge, or discard this patch.