Passed
Push — master ( 073721...924750 )
by Robin
02:35
created
src/helpers.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -182,4 +182,4 @@
 block discarded – undo
182 182
  
183 183
  
184 184
  
185
- 
186 185
\ No newline at end of file
186
+    
187 187
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                     }
88 88
                     $code = array_filter(array_slice($lines, $start, $end - $start + 1, true), 'trim');
89 89
                     $max = strlen($end);
90
-                    $cite->code = implode("\n", array_map(function ($u, $v) use ($max) {
90
+                    $cite->code = implode("\n", array_map(function($u, $v) use ($max) {
91 91
                         return sprintf("%{$max}d    %s", $u + 1, rtrim($v));
92 92
                     }, array_keys($code), $code));
93 93
                     $cite->save();
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     function sweep()
106 106
     {
107 107
         array_map(
108
-            function ($u) {
108
+            function($u) {
109 109
                 $u->sweep();
110 110
             },
111 111
             array_merge(
@@ -159,16 +159,16 @@  discard block
 block discarded – undo
159 159
         $namespaces = VocabTerm::namespaces();
160 160
         foreach ($namespaces as $namespace) {
161 161
             foreach ($locales as $locale) {
162
-                $langue_file=str_replace('/', '.', strtolower(ltrim($namespace,'/')));
163
-                $langue_file = str_replace('//', '/', implode('/',[$path,$locale,$langue_file]));
164
-                $lines=['<?php','','return ['];
162
+                $langue_file = str_replace('/', '.', strtolower(ltrim($namespace, '/')));
163
+                $langue_file = str_replace('//', '/', implode('/', [$path, $locale, $langue_file]));
164
+                $lines = ['<?php', '', 'return ['];
165 165
                 foreach (VocabTerm::where('namespace', $namespace)->get() as $term) {
166
-                        $lines[]=sprintf("    '%s'=>'%s',",
166
+                        $lines[] = sprintf("    '%s'=>'%s',",
167 167
                         $term->slug,
168
-                        localize($term->translation,$term->translation[config('app.locale')]));
168
+                        localize($term->translation, $term->translation[config('app.locale')]));
169 169
                 }
170
-                $lines[]='];';
171
-                file_put_contents($langue_file,implode("\n",$lines));
170
+                $lines[] = '];';
171
+                file_put_contents($langue_file, implode("\n", $lines));
172 172
             }
173 173
         }
174 174
     }
Please login to merge, or discard this patch.
src/service/Translation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     {
38 38
         if (empty($this->term)) {
39 39
             sweep();
40
-            array_map(function ($u) {
40
+            array_map(function($u) {
41 41
                 $this->translation($u, $this->locales);
42 42
             }, VocabTerm::get()->all());
43 43
         } else {
Please login to merge, or discard this patch.
src/model/VocabTerm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
             call_user_func_array(
60 60
                 ' array_merge',
61 61
                 array_map(
62
-                    function ($u) {
62
+                    function($u) {
63 63
                         return array_keys($u->translation);
64 64
                     },
65 65
                     self::get()->all()
Please login to merge, or discard this patch.
src/model/VocabCite.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         if ($line) {
39 39
             foreach ($this->terms()->get() as $term) {
40 40
                 $keywords = ["localize('{$term->term}')", 'localize("' . $term->term . '")'];
41
-                $matched = array_filter(array_map(function ($u) use ($line) {
41
+                $matched = array_filter(array_map(function($u) use ($line) {
42 42
                     return strpos($line, $u);
43 43
                 }, $keywords), 'strlen');
44 44
                 if (empty($matched)) {
Please login to merge, or discard this patch.
src/migration/2019_03_11_103021_create_vocabularies_table.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         if (!Schema::connection($connection)->hasTable('_trans_helper_cites')) {
23 23
             Schema::connection($connection)->create(
24 24
                 '_trans_helper_cites',
25
-                function (Blueprint $table) {
25
+                function(Blueprint $table) {
26 26
                     $table->bigIncrements('id');
27 27
                     $table->string('file', 256)->default('');
28 28
                     $table->unsignedBigInteger('line');
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         if (!Schema::connection($connection)->hasTable('_trans_helper_terms')) {
45 45
             Schema::connection($connection)->create(
46 46
                 '_trans_helper_terms',
47
-                function (Blueprint $table) {
47
+                function(Blueprint $table) {
48 48
                     $table->bigIncrements('id');
49 49
                     $table->string('namespace', 256)->default('');
50 50
                     $table->string('term', 256)->default('');
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         if (!Schema::connection($connection)->hasTable('_trans_helper_links')) {
64 64
             Schema::connection($connection)->create(
65 65
                 '_trans_helper_links',
66
-                function (Blueprint $table) {
66
+                function(Blueprint $table) {
67 67
                     $table->unsignedBigInteger('cited');
68 68
                     $table->unsignedBigInteger('vocab');
69 69
 
Please login to merge, or discard this patch.
src/migration/2019_03_10_110221_create_queue_tables.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
             if (!Schema::connection($connection)->hasTable(config('queue.database.failed.table'))) {
19 19
                 Schema::connection($connection)->create(
20 20
                     config('queue.database.failed.table'),
21
-                    function (Blueprint $table) {
21
+                    function(Blueprint $table) {
22 22
                         $table->bigIncrements('id');
23 23
                         $table->text('connection');
24 24
                         $table->text('queue');
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             if (!Schema::connection($connection)->hasTable(config('queue.connections.database.table'))) {
33 33
                 Schema::connection($connection)->create(
34 34
                     config('queue.connections.database.table'),
35
-                    function (Blueprint $table) {
35
+                    function(Blueprint $table) {
36 36
                         $table->bigIncrements('id');
37 37
                         $table->string('queue')->index();
38 38
                         $table->longText('payload');
Please login to merge, or discard this patch.