Completed
Push — master ( 12d899...a33b7a )
by Avtandil
04:40
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   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
         );
45 45
 
46 46
         // Register blade directives
47
-        Blade::directive('t', function ($expression) {
47
+        Blade::directive('t', function($expression) {
48 48
             return "<?php echo e(t({$expression})); ?>";
49 49
         });
50 50
 
51
-        $this->app['events']->listen('locale.changed', function ($locale) {
51
+        $this->app['events']->listen('locale.changed', function($locale) {
52 52
             $this->app['multilang']->setLocale($locale);
53 53
         });
54 54
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $configPath = __DIR__ . '/../config/config.php';
73 73
         $this->mergeConfigFrom($configPath, 'debugbar');
74 74
 
75
-        $this->app->singleton('multilang', function ($app) {
75
+        $this->app->singleton('multilang', function($app) {
76 76
             $environment = $app->environment();
77 77
             $config = $app['config']->get('multilang');
78 78
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             );
85 85
 
86 86
             if ($multilang->autoSaveIsAllowed()) {
87
-                $app->terminating(function () use ($multilang) {
87
+                $app->terminating(function() use ($multilang) {
88 88
                     return $multilang->saveTexts();
89 89
                 });
90 90
             }
@@ -95,13 +95,13 @@  discard block
 block discarded – undo
95 95
         $this->app->alias('multilang', 'Longman\LaravelMultiLang\MultiLang');
96 96
 
97 97
         $this->app['command.multilang.migration'] = $this->app->share(
98
-            function () {
98
+            function() {
99 99
                 return new MigrationCommand();
100 100
             }
101 101
         );
102 102
 
103 103
         $this->app['command.multilang.texts'] = $this->app->share(
104
-            function () {
104
+            function() {
105 105
                 return new TextsCommand();
106 106
             }
107 107
         );
Please login to merge, or discard this patch.
src/MultiLang/TextsTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@
 block discarded – undo
24 24
             $options['scope'] = $request->scope;
25 25
         }
26 26
 
27
-        $texts = Text::where(function ($q) use ($options) {
27
+        $texts = Text::where(function($q) use ($options) {
28 28
             foreach ($options as $k => $v) {
29 29
                 if ($k == 'keyword') {
30
-                    $q->where(function ($query) use ($v) {
30
+                    $q->where(function($query) use ($v) {
31 31
                         $query->where('key', 'LIKE', '%' . $v . '%')->orWhere('value', 'LIKE', '%' . $v . '%');
32 32
                     });
33 33
                 } else {
Please login to merge, or discard this patch.
src/MultiLang/Config.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -12,9 +12,6 @@
 block discarded – undo
12 12
 
13 13
 use Illuminate\Cache\CacheManager as Cache;
14 14
 use Illuminate\Database\DatabaseManager as Database;
15
-use Illuminate\Http\Request;
16
-use Illuminate\Support\Collection;
17
-use InvalidArgumentException;
18 15
 use Longman\LaravelMultiLang\Config;
19 16
 
20 17
 class Repository
Please login to merge, or discard this patch.
src/MultiLang/MultiLang.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 use Illuminate\Cache\CacheManager as Cache;
15 15
 use Illuminate\Database\DatabaseManager as Database;
16 16
 use Illuminate\Http\Request;
17
-use Illuminate\Routing\Router;
18 17
 use InvalidArgumentException;
19 18
 use Longman\LaravelMultiLang\Config;
20 19
 use Longman\LaravelMultiLang\Repository;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@
 block discarded – undo
230 230
         foreach ($locales as $locale => $val) {
231 231
             $router->group([
232 232
                 'prefix' => $locale,
233
-                'as'     => $locale.'.',
233
+                'as'     => $locale . '.',
234 234
             ], $callback);
235 235
         }
236 236
 
Please login to merge, or discard this patch.
src/MultiLang/Models/Localizable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
     public function getQualifiedLocalizableColumn()
32 32
     {
33
-        return $this->getTable().'.'.$this->getLocalizableColumn();
33
+        return $this->getTable() . '.' . $this->getLocalizableColumn();
34 34
     }
35 35
 
36 36
 
Please login to merge, or discard this patch.
src/MultiLang/Models/LocalizableScope.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     {
37 37
         $wheres = $builder->getQuery()->wheres;
38 38
         $column = $this->getLocalizableColumn($builder);
39
-        foreach($wheres as $where) {
39
+        foreach ($wheres as $where) {
40 40
             if ($where['column'] == $column) {
41 41
                 return true;
42 42
             }
Please login to merge, or discard this patch.