Completed
Push — master ( c2a60e...53c26d )
by Song
03:28 queued 54s
created
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 1 patch
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.
src/Form.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -305,9 +305,9 @@  discard block
 block discarded – undo
305 305
         $data = $this->model->with($this->getRelations())
306 306
             ->findOrFail($id)->toArray();
307 307
 
308
-        $this->builder->fields()->filter(function ($field) {
308
+        $this->builder->fields()->filter(function($field) {
309 309
             return $field instanceof Field\File;
310
-        })->each(function (File $file) use ($data) {
310
+        })->each(function(File $file) use ($data) {
311 311
             $file->setOriginal($data);
312 312
 
313 313
             $file->destroy();
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
             return $response;
333 333
         }
334 334
 
335
-        DB::transaction(function () {
335
+        DB::transaction(function() {
336 336
             $inserts = $this->prepareInsert($this->updates);
337 337
 
338 338
             foreach ($inserts as $column => $value) {
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
             return $response;
528 528
         }
529 529
 
530
-        DB::transaction(function () {
530
+        DB::transaction(function() {
531 531
             $updates = $this->prepareUpdate($this->updates);
532 532
 
533 533
             foreach ($updates as $column => $value) {
@@ -912,7 +912,7 @@  discard block
 block discarded – undo
912 912
     protected function getFieldByColumn($column)
913 913
     {
914 914
         return $this->builder->fields()->first(
915
-            function (Field $field) use ($column) {
915
+            function(Field $field) use ($column) {
916 916
                 if (is_array($field->column())) {
917 917
                     return in_array($column, $field->column());
918 918
                 }
@@ -931,7 +931,7 @@  discard block
 block discarded – undo
931 931
     {
932 932
         $values = $this->model->toArray();
933 933
 
934
-        $this->builder->fields()->each(function (Field $field) use ($values) {
934
+        $this->builder->fields()->each(function(Field $field) use ($values) {
935 935
             $field->setOriginal($values);
936 936
         });
937 937
     }
@@ -951,7 +951,7 @@  discard block
 block discarded – undo
951 951
 
952 952
         $data = $this->model->toArray();
953 953
 
954
-        $this->builder->fields()->each(function (Field $field) use ($data) {
954
+        $this->builder->fields()->each(function(Field $field) use ($data) {
955 955
             $field->fill($data);
956 956
         });
957 957
     }
@@ -1054,7 +1054,7 @@  discard block
 block discarded – undo
1054 1054
      */
1055 1055
     public function setWidth($fieldWidth = 8, $labelWidth = 2)
1056 1056
     {
1057
-        $this->builder()->fields()->each(function ($field) use ($fieldWidth, $labelWidth) {
1057
+        $this->builder()->fields()->each(function($field) use ($fieldWidth, $labelWidth) {
1058 1058
             /* @var Field $field  */
1059 1059
             $field->setWidth($fieldWidth, $labelWidth);
1060 1060
         });
Please login to merge, or discard this patch.
src/Middleware/Permission.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
             return $next($request);
22 22
         }
23 23
 
24
-        if (!Admin::user()->allPermissions()->first(function ($permission) use ($request) {
24
+        if (!Admin::user()->allPermissions()->first(function($permission) use ($request) {
25 25
             return $permission->shouldPassThrough($request);
26 26
         })) {
27 27
             \Encore\Admin\Auth\Permission::error();
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
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public static function respond(\Symfony\Component\HttpFoundation\Response $response)
46 46
     {
47
-        $next = function () use ($response) {
47
+        $next = function() use ($response) {
48 48
             return $response;
49 49
         };
50 50
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      */
137 137
     protected function decodeUtf8HtmlEntities($html)
138 138
     {
139
-        return preg_replace_callback('/(&#[0-9]+;)/', function ($html) {
139
+        return preg_replace_callback('/(&#[0-9]+;)/', function($html) {
140 140
             return mb_convert_encoding($html[1], 'UTF-8', 'HTML-ENTITIES');
141 141
         }, $html);
142 142
     }
Please login to merge, or discard this patch.
src/Grid.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
         $callback = $this->actionsCallback;
435 435
         $column = $this->addColumn('__actions__', trans('admin.action'));
436 436
 
437
-        $column->display(function ($value) use ($grid, $column, $callback) {
437
+        $column->display(function($value) use ($grid, $column, $callback) {
438 438
             $actions = new Actions($value, $grid, $column, $this);
439 439
 
440 440
             return $actions->display($callback);
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
      */
449 449
     public function disableRowSelector()
450 450
     {
451
-        $this->tools(function ($tools) {
451
+        $this->tools(function($tools) {
452 452
             /* @var Grid\Tools $tools */
453 453
             $tools->disableBatchActions();
454 454
         });
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
         $column = new Column(Column::SELECT_COLUMN_NAME, ' ');
473 473
         $column->setGrid($this);
474 474
 
475
-        $column->display(function ($value) use ($grid, $column) {
475
+        $column->display(function($value) use ($grid, $column) {
476 476
             $actions = new RowSelector($value, $grid, $column, $this);
477 477
 
478 478
             return $actions->display();
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
 
500 500
         Column::setOriginalGridData($data);
501 501
 
502
-        $this->columns->map(function (Column $column) use (&$data) {
502
+        $this->columns->map(function(Column $column) use (&$data) {
503 503
             $data = $column->fill($data);
504 504
 
505 505
             $this->columnNames[] = $column->getName();
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
      */
578 578
     protected function buildRows(array $data)
579 579
     {
580
-        $this->rows = collect($data)->map(function ($model, $number) {
580
+        $this->rows = collect($data)->map(function($model, $number) {
581 581
             return new Row($number, $model);
582 582
         });
583 583
 
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.
resources/views/partials/exception.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 @if($errors->hasBag('exception'))
2
-    <?php $error = $errors->getBag('exception');?>
2
+    <?php $error = $errors->getBag('exception'); ?>
3 3
     <div class="alert alert-warning alert-dismissable">
4 4
         <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
5 5
         <h4>
Please login to merge, or discard this patch.
resources/views/partials/error.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 @if(Session::has('error'))
2
-    <?php $error = Session::get('error');?>
2
+    <?php $error = Session::get('error'); ?>
3 3
     <div class="alert alert-danger alert-dismissable">
4 4
         <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
5 5
         <h4><i class="icon fa fa-ban"></i>{{ array_get($error->get('title'), 0) }}</h4>
Please login to merge, or discard this patch.