Completed
Pull Request — master (#3047)
by Nastuzzi
02:29
created
src/Form/EmbeddedForm.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
      */
162 162
     protected function prepareValue($key, $record)
163 163
     {
164
-        $field = $this->fields->first(function (Field $field) use ($key) {
164
+        $field = $this->fields->first(function(Field $field) use ($key) {
165 165
             return in_array($key, (array) $field->column());
166 166
         });
167 167
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
         if (array_key_exists($key, $this->original)) {
185 185
             $values = $this->original[$key];
186 186
 
187
-            $this->fields->each(function (Field $field) use ($values) {
187
+            $this->fields->each(function(Field $field) use ($values) {
188 188
                 $field->setOriginal($values);
189 189
             });
190 190
         }
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
      */
200 200
     public function fill(array $data)
201 201
     {
202
-        $this->fields->each(function (Field $field) use ($data) {
202
+        $this->fields->each(function(Field $field) use ($data) {
203 203
             $field->fill($data);
204 204
         });
205 205
 
Please login to merge, or discard this patch.
src/Traits/ModelTree.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     {
197 197
         static::$branchOrder = array_flip(array_flatten($order));
198 198
 
199
-        static::$branchOrder = array_map(function ($item) {
199
+        static::$branchOrder = array_map(function($item) {
200 200
             return ++$item;
201 201
         }, static::$branchOrder);
202 202
     }
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
     {
291 291
         parent::boot();
292 292
 
293
-        static::saving(function (Model $branch) {
293
+        static::saving(function(Model $branch) {
294 294
             $parentColumn = $branch->getParentColumn();
295 295
 
296 296
             if (Request::has($parentColumn) && Request::input($parentColumn) == $branch->getKey()) {
Please login to merge, or discard this patch.
src/Tree.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
     protected function initBranchCallback()
104 104
     {
105 105
         if (is_null($this->branchCallback)) {
106
-            $this->branchCallback = function ($branch) {
106
+            $this->branchCallback = function($branch) {
107 107
                 $key = $branch[$this->model->getKeyName()];
108 108
                 $title = $branch[$this->model->getTitleColumn()];
109 109
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     /**
140 140
      * Set query callback this tree.
141 141
      *
142
-     * @return Model
142
+     * @return Tree
143 143
      */
144 144
     public function query(\Closure $callback)
145 145
     {
@@ -312,7 +312,6 @@  discard block
 block discarded – undo
312 312
     /**
313 313
      * Return all items of the tree.
314 314
      *
315
-     * @param array $items
316 315
      */
317 316
     public function getItems()
318 317
     {
Please login to merge, or discard this patch.
database/migrations/2016_01_04_173148_create_admin_tables.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     {
15 15
         $connection = config('admin.database.connection') ?: config('database.default');
16 16
 
17
-        Schema::connection($connection)->create(config('admin.database.users_table'), function (Blueprint $table) {
17
+        Schema::connection($connection)->create(config('admin.database.users_table'), function(Blueprint $table) {
18 18
             $table->increments('id');
19 19
             $table->string('username', 190)->unique();
20 20
             $table->string('password', 60);
@@ -23,21 +23,21 @@  discard block
 block discarded – undo
23 23
             $table->timestamps();
24 24
         });
25 25
 
26
-        Schema::connection($connection)->create(config('admin.database.roles_table'), function (Blueprint $table) {
26
+        Schema::connection($connection)->create(config('admin.database.roles_table'), function(Blueprint $table) {
27 27
             $table->increments('id');
28 28
             $table->string('name', 50)->unique();
29 29
             $table->string('slug', 50);
30 30
             $table->timestamps();
31 31
         });
32 32
 
33
-        Schema::connection($connection)->create(config('admin.database.permissions_table'), function (Blueprint $table) {
33
+        Schema::connection($connection)->create(config('admin.database.permissions_table'), function(Blueprint $table) {
34 34
             $table->increments('id');
35 35
             $table->string('name', 50)->unique();
36 36
             $table->string('slug', 50);
37 37
             $table->timestamps();
38 38
         });
39 39
 
40
-        Schema::connection($connection)->create(config('admin.database.menu_table'), function (Blueprint $table) {
40
+        Schema::connection($connection)->create(config('admin.database.menu_table'), function(Blueprint $table) {
41 41
             $table->increments('id');
42 42
             $table->integer('parent_id')->default(0);
43 43
             $table->integer('order')->default(0);
@@ -48,35 +48,35 @@  discard block
 block discarded – undo
48 48
             $table->timestamps();
49 49
         });
50 50
 
51
-        Schema::connection($connection)->create(config('admin.database.role_users_table'), function (Blueprint $table) {
51
+        Schema::connection($connection)->create(config('admin.database.role_users_table'), function(Blueprint $table) {
52 52
             $table->integer('role_id');
53 53
             $table->integer('user_id');
54 54
             $table->index(['role_id', 'user_id']);
55 55
             $table->timestamps();
56 56
         });
57 57
 
58
-        Schema::connection($connection)->create(config('admin.database.role_permissions_table'), function (Blueprint $table) {
58
+        Schema::connection($connection)->create(config('admin.database.role_permissions_table'), function(Blueprint $table) {
59 59
             $table->integer('role_id');
60 60
             $table->integer('permission_id');
61 61
             $table->index(['role_id', 'permission_id']);
62 62
             $table->timestamps();
63 63
         });
64 64
 
65
-        Schema::connection($connection)->create(config('admin.database.user_permissions_table'), function (Blueprint $table) {
65
+        Schema::connection($connection)->create(config('admin.database.user_permissions_table'), function(Blueprint $table) {
66 66
             $table->integer('user_id');
67 67
             $table->integer('permission_id');
68 68
             $table->index(['user_id', 'permission_id']);
69 69
             $table->timestamps();
70 70
         });
71 71
 
72
-        Schema::connection($connection)->create(config('admin.database.role_menu_table'), function (Blueprint $table) {
72
+        Schema::connection($connection)->create(config('admin.database.role_menu_table'), function(Blueprint $table) {
73 73
             $table->integer('role_id');
74 74
             $table->integer('menu_id');
75 75
             $table->index(['role_id', 'menu_id']);
76 76
             $table->timestamps();
77 77
         });
78 78
 
79
-        Schema::connection($connection)->create(config('admin.database.operation_log_table'), function (Blueprint $table) {
79
+        Schema::connection($connection)->create(config('admin.database.operation_log_table'), function(Blueprint $table) {
80 80
             $table->increments('id');
81 81
             $table->integer('user_id');
82 82
             $table->string('path');
Please login to merge, or discard this patch.
src/Form/Field/MultipleFile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
     {
135 135
         $this->name = $this->getStoreName($file);
136 136
 
137
-        return tap($this->upload($file), function () {
137
+        return tap($this->upload($file), function() {
138 138
             $this->name = null;
139 139
         });
140 140
     }
Please login to merge, or discard this patch.
src/Form/Field/MultipleImage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 
34 34
         $this->callInterventionMethods($image->getRealPath());
35 35
 
36
-        return tap($this->upload($image), function () {
36
+        return tap($this->upload($image), function() {
37 37
             $this->name = null;
38 38
         });
39 39
     }
Please login to merge, or discard this patch.
src/Middleware/Pjax.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public static function respond(Response $response)
49 49
     {
50
-        $next = function () use ($response) {
50
+        $next = function() use ($response) {
51 51
             return $response;
52 52
         };
53 53
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      */
140 140
     protected function decodeUtf8HtmlEntities($html)
141 141
     {
142
-        return preg_replace_callback('/(&#[0-9]+;)/', function ($html) {
142
+        return preg_replace_callback('/(&#[0-9]+;)/', function($html) {
143 143
             return mb_convert_encoding($html[1], 'UTF-8', 'HTML-ENTITIES');
144 144
         }, $html);
145 145
     }
Please login to merge, or discard this patch.
src/Controllers/Dashboard.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -20,20 +20,20 @@
 block discarded – undo
20 20
     public static function environment()
21 21
     {
22 22
         $envs = [
23
-            ['name' => 'PHP version',       'value' => 'PHP/'.PHP_VERSION],
24
-            ['name' => 'Laravel version',   'value' => app()->version()],
25
-            ['name' => 'CGI',               'value' => php_sapi_name()],
26
-            ['name' => 'Uname',             'value' => php_uname()],
27
-            ['name' => 'Server',            'value' => array_get($_SERVER, 'SERVER_SOFTWARE')],
23
+            ['name' => 'PHP version', 'value' => 'PHP/'.PHP_VERSION],
24
+            ['name' => 'Laravel version', 'value' => app()->version()],
25
+            ['name' => 'CGI', 'value' => php_sapi_name()],
26
+            ['name' => 'Uname', 'value' => php_uname()],
27
+            ['name' => 'Server', 'value' => array_get($_SERVER, 'SERVER_SOFTWARE')],
28 28
 
29
-            ['name' => 'Cache driver',      'value' => config('cache.default')],
30
-            ['name' => 'Session driver',    'value' => config('session.driver')],
31
-            ['name' => 'Queue driver',      'value' => config('queue.default')],
29
+            ['name' => 'Cache driver', 'value' => config('cache.default')],
30
+            ['name' => 'Session driver', 'value' => config('session.driver')],
31
+            ['name' => 'Queue driver', 'value' => config('queue.default')],
32 32
 
33
-            ['name' => 'Timezone',          'value' => config('app.timezone')],
34
-            ['name' => 'Locale',            'value' => config('app.locale')],
35
-            ['name' => 'Env',               'value' => config('app.env')],
36
-            ['name' => 'URL',               'value' => config('app.url')],
33
+            ['name' => 'Timezone', 'value' => config('app.timezone')],
34
+            ['name' => 'Locale', 'value' => config('app.locale')],
35
+            ['name' => 'Env', 'value' => config('app.env')],
36
+            ['name' => 'URL', 'value' => config('app.url')],
37 37
         ];
38 38
 
39 39
         return view('admin::dashboard.environment', compact('envs'));
Please login to merge, or discard this patch.
src/Grid/Filter/Presenter/Select.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
      *
169 169
      * @param string $target
170 170
      *
171
-     * @return mixed
171
+     * @return string
172 172
      */
173 173
     protected function getClass($target) : string
174 174
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
             throw new \InvalidArgumentException("[$model] must be a valid model class");
106 106
         }
107 107
 
108
-        $this->options = function ($value) use ($model, $idField, $textField) {
108
+        $this->options = function($value) use ($model, $idField, $textField) {
109 109
             if (empty($value)) {
110 110
                 return [];
111 111
             }
Please login to merge, or discard this patch.