Completed
Push — master ( 65b094...b25e0f )
by Terzi
04:45
created
src/Traits/ExportsCollection.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -134,8 +134,8 @@
 block discarded – undo
134 134
         ])->render();
135 135
 
136 136
         return $pdf->loadHTML($html)
137
-                   ->setPaper('a4', 'landscape')
138
-                   ->download(app('scaffold.module')->url().'.pdf');
137
+                    ->setPaper('a4', 'landscape')
138
+                    ->download(app('scaffold.module')->url().'.pdf');
139 139
     }
140 140
 
141 141
     /**
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         }
154 154
 
155 155
         return $query
156
-            ->when($query->getModel() instanceof Translatable, function ($query) {
156
+            ->when($query->getModel() instanceof Translatable, function($query) {
157 157
                 $query->translated();
158 158
             })
159 159
             // leave select after joining with translations
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
      */
169 169
     protected function toScalar($object): array
170 170
     {
171
-        return array_filter($object->toArray(), function ($item) {
171
+        return array_filter($object->toArray(), function($item) {
172 172
             return is_scalar($item);
173 173
         });
174 174
     }
@@ -260,13 +260,13 @@  discard block
 block discarded – undo
260 260
         return collect($model->getFillable())
261 261
             ->prepend('id')
262 262
             ->diff($model->getHidden())
263
-            ->map(function ($column) use ($model) {
263
+            ->map(function($column) use ($model) {
264 264
                 return "{$model->getTable()}.{$column}";
265 265
             })
266
-            ->when($model instanceof Translatable, function (Collection $collection) use ($model) {
266
+            ->when($model instanceof Translatable, function(Collection $collection) use ($model) {
267 267
                 return $collection->merge(
268 268
                     collect($model->getTranslatedAttributes())
269
-                        ->map(function ($column) use ($model) {
269
+                        ->map(function($column) use ($model) {
270 270
                             return "tt.{$column}";
271 271
                         })
272 272
                 );
Please login to merge, or discard this patch.
src/Traits/SortsObjectsCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
             $objects = $objects->toArray();
24 24
         }
25 25
 
26
-        usort($objects, function ($aObj, $bObj) {
26
+        usort($objects, function($aObj, $bObj) {
27 27
             [$aRank, $bRank] = $this->getRanks($aObj, $bObj);
28 28
 
29 29
             if ($this->equals($aRank, $bRank)) {
Please login to merge, or discard this patch.
src/Services/Template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@
 block discarded – undo
154 154
     {
155 155
         return array_merge(
156 156
             ['index' => "administrator::{$namespace}"],
157
-            array_build($views, function ($key, $view) use ($namespace) {
157
+            array_build($views, function($key, $view) use ($namespace) {
158 158
                 return [$view, "administrator::{$namespace}.{$view}"];
159 159
             })
160 160
         );
Please login to merge, or discard this patch.
src/Services/Finder.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,8 +65,8 @@
 block discarded – undo
65 65
         // prevent duplicated execution
66 66
         if (null === $this->query && $this->model) {
67 67
             $this->initQuery()
68
-                 ->applyFilters()
69
-                 ->applySorting();
68
+                    ->applyFilters()
69
+                    ->applySorting();
70 70
 
71 71
             $this->query = $this->assembler()->getQuery();
72 72
         }
Please login to merge, or discard this patch.
src/Services/Breadcrumbs.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     {
83 83
         $this->index();
84 84
 
85
-        $this->register('edit', function (Generator $breadcrumbs) {
85
+        $this->register('edit', function(Generator $breadcrumbs) {
86 86
             $breadcrumbs->parent('index');
87 87
 
88 88
             $breadcrumbs->push(trans('administrator::module.action.edit', [
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
     protected function index()
96 96
     {
97
-        $this->register('index', function (Generator $breadcrumbs) {
97
+        $this->register('index', function(Generator $breadcrumbs) {
98 98
             $breadcrumbs->push($this->module->title(), route('scaffold.index', [
99 99
                 'module' => $this->module->url(),
100 100
             ]));
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     {
106 106
         $this->index();
107 107
 
108
-        $this->register('create', function (Generator $breadcrumbs) {
108
+        $this->register('create', function(Generator $breadcrumbs) {
109 109
             $breadcrumbs->parent('index');
110 110
             $breadcrumbs->push(trans('administrator::module.action.create', [
111 111
                 'resource' => $this->module->singular(),
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     {
118 118
         $this->index();
119 119
 
120
-        $this->register('view', function (Generator $breadcrumbs) {
120
+        $this->register('view', function(Generator $breadcrumbs) {
121 121
             $breadcrumbs->parent('index');
122 122
             $breadcrumbs->push(trans('administrator::module.action.view', [
123 123
                 'resource' => $this->module->singular(),
Please login to merge, or discard this patch.
src/Services/Translator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,12 +103,12 @@
 block discarded – undo
103 103
                 glob(resource_path("{$path}/*.php"))
104 104
             );
105 105
 
106
-            $files = $files->map(function ($file) {
106
+            $files = $files->map(function($file) {
107 107
                 return str_replace_last('.php', '', basename($file));
108 108
             }, $files);
109 109
         }
110 110
 
111
-        return $files->when($only, function (Collection $files) use ($only) {
111
+        return $files->when($only, function(Collection $files) use ($only) {
112 112
             return $files->intersect(is_array($only) ? $only : [$only]);
113 113
         });
114 114
     }
Please login to merge, or discard this patch.
src/Services/Saver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     public function sync()
70 70
     {
71
-        $this->connection()->transaction(function () {
71
+        $this->connection()->transaction(function() {
72 72
             foreach ($this->editable() as $field) {
73 73
                 // get original HTML input
74 74
                 $name = $field->id();
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         $keys = explode('.', $this->getQualifiedRelatedKeyName($relation));
263 263
         $key = array_pop($keys);
264 264
 
265
-        return array_filter((array) $values[$key], function ($value) {
265
+        return array_filter((array) $values[$key], function($value) {
266 266
             return null !== $value;
267 267
         });
268 268
     }
Please login to merge, or discard this patch.
src/Services/MagnetParams.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,14 +54,14 @@
 block discarded – undo
54 54
 
55 55
     public function toArray()
56 56
     {
57
-        $params = array_build($this->params, function ($index, $param) {
57
+        $params = array_build($this->params, function($index, $param) {
58 58
             if (is_string($param)) {
59 59
                 return [$param, $this->request->get($param, null)];
60 60
             }
61 61
         });
62 62
 
63 63
         if ($this->isStrictMode()) {
64
-            $params = array_filter($params, function ($item) {
64
+            $params = array_filter($params, function($item) {
65 65
                 return null !== $item;
66 66
             });
67 67
         }
Please login to merge, or discard this patch.
src/Services/FileStorage.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         return collect([])
47 47
             ->merge($this->filesystem->files($directory))
48
-            ->map(function ($file) {
48
+            ->map(function($file) {
49 49
                 return new File($file, $this);
50 50
             });
51 51
     }
@@ -60,14 +60,14 @@  discard block
 block discarded – undo
60 60
     public function directories($directory)
61 61
     {
62 62
         return collect($this->filesystem->directories($directory))
63
-            ->map(function ($file) {
63
+            ->map(function($file) {
64 64
                 return new File($file, $this);
65 65
             });
66 66
     }
67 67
 
68 68
     public function mkdir($name, $basename = null)
69 69
     {
70
-        $directory = array_filter([$this->path($basename), $name], function ($item) {
70
+        $directory = array_filter([$this->path($basename), $name], function($item) {
71 71
             return null !== $item;
72 72
         });
73 73
 
@@ -110,15 +110,15 @@  discard block
 block discarded – undo
110 110
 
111 111
     public function delete($files = [], $directories = [])
112 112
     {
113
-        collect($files)->map(function ($file) {
113
+        collect($files)->map(function($file) {
114 114
             return $this->compilePath([$this->basename(), $file]);
115
-        })->each(function ($file) {
115
+        })->each(function($file) {
116 116
             $this->filesystem->delete($file);
117 117
         });
118 118
 
119
-        collect($directories)->map(function ($file) {
119
+        collect($directories)->map(function($file) {
120 120
             return $this->compilePath([$this->basename(), $file]);
121
-        })->each(function ($file) {
121
+        })->each(function($file) {
122 122
             $this->filesystem->deleteDirectory($file);
123 123
         });
124 124
     }
Please login to merge, or discard this patch.