Completed
Pull Request — master (#149)
by
unknown
02:38
created
src/Grid/Row.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
     public function style($style)
135 135
     {
136 136
         if (is_array($style)) {
137
-            $style = implode('', array_map(function ($key, $val) {
137
+            $style = implode('', array_map(function($key, $val) {
138 138
                 return "$key:$val";
139 139
             }, array_keys($style), array_values($style)));
140 140
         }
Please login to merge, or discard this patch.
src/Providers/AdminServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function register()
62 62
     {
63
-        $this->app->booting(function () {
63
+        $this->app->booting(function() {
64 64
             $loader = AliasLoader::getInstance();
65 65
 
66 66
             $loader->alias('Admin', \Encore\Admin\Facades\Admin::class);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
     public function registerRouter()
116 116
     {
117
-        $this->app->singleton('admin.router', function ($app) {
117
+        $this->app->singleton('admin.router', function($app) {
118 118
             return new Router($app['router']);
119 119
         });
120 120
     }
Please login to merge, or discard this patch.
src/Controllers/PermissionController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public function index()
22 22
     {
23
-        return Admin::content(function (Content $content) {
23
+        return Admin::content(function(Content $content) {
24 24
             $content->header(trans('admin::lang.permissions'));
25 25
             $content->description(trans('admin::lang.list'));
26 26
             $content->body($this->grid()->render());
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function edit($id)
38 38
     {
39
-        return Admin::content(function (Content $content) use ($id) {
39
+        return Admin::content(function(Content $content) use ($id) {
40 40
             $content->header(trans('admin::lang.permissions'));
41 41
             $content->description(trans('admin::lang.edit'));
42 42
             $content->body($this->form()->edit($id));
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function create()
52 52
     {
53
-        return Admin::content(function (Content $content) {
53
+        return Admin::content(function(Content $content) {
54 54
             $content->header(trans('admin::lang.permissions'));
55 55
             $content->description(trans('admin::lang.create'));
56 56
             $content->body($this->form());
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     protected function grid()
66 66
     {
67
-        return Admin::grid(Permission::class, function (Grid $grid) {
67
+        return Admin::grid(Permission::class, function(Grid $grid) {
68 68
             $grid->id('ID')->sortable();
69 69
             $grid->slug(trans('admin::lang.slug'));
70 70
             $grid->name(trans('admin::lang.name'));
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function form()
83 83
     {
84
-        return Admin::form(Permission::class, function (Form $form) {
84
+        return Admin::form(Permission::class, function(Form $form) {
85 85
             $form->display('id', 'ID');
86 86
 
87 87
             $form->text('slug', trans('admin::lang.slug'));
Please login to merge, or discard this patch.
src/Widgets/Box.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
             return $this->style([$styles]);
65 65
         }
66 66
 
67
-        $styles = array_map(function ($style) {
67
+        $styles = array_map(function($style) {
68 68
             return 'box-'.$style;
69 69
         }, $styles);
70 70
 
Please login to merge, or discard this patch.
src/Widgets/Form.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
      * @param Field $field
141 141
      * @return $this
142 142
      */
143
-    protected function pushField(Field &$field)
143
+    protected function pushField(Field & $field)
144 144
     {
145 145
         array_push($this->fields, $field);
146 146
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
     /**
118 118
      * Add form attributes.
119 119
      *
120
-     * @param string|array $attr
120
+     * @param string $attr
121 121
      * @param string       $value
122 122
      *
123 123
      * @return $this
Please login to merge, or discard this patch.
src/Auth/Database/Menu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
     {
85 85
         static::$branchOrder = array_flip(array_flatten($order));
86 86
 
87
-        static::$branchOrder = array_map(function ($item) {
87
+        static::$branchOrder = array_map(function($item) {
88 88
             return ++$item;
89 89
         }, static::$branchOrder);
90 90
     }
Please login to merge, or discard this patch.
src/Form/Field/File.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
     /**
77 77
      * @param $file
78 78
      *
79
-     * @return mixed
79
+     * @return string
80 80
      */
81 81
     protected function uploadAndDeleteOriginal(UploadedFile $file)
82 82
     {
Please login to merge, or discard this patch.
src/Controllers/UserController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function index()
23 23
     {
24
-        return Admin::content(function (Content $content) {
24
+        return Admin::content(function(Content $content) {
25 25
             $content->header(trans('admin::lang.administrator'));
26 26
             $content->description(trans('admin::lang.list'));
27 27
             $content->body($this->grid()->render());
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function edit($id)
39 39
     {
40
-        return Admin::content(function (Content $content) use ($id) {
40
+        return Admin::content(function(Content $content) use ($id) {
41 41
             $content->header(trans('admin::lang.administrator'));
42 42
             $content->description(trans('admin::lang.edit'));
43 43
             $content->body($this->form()->edit($id));
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function create()
53 53
     {
54
-        return Admin::content(function (Content $content) {
54
+        return Admin::content(function(Content $content) {
55 55
             $content->header(trans('admin::lang.administrator'));
56 56
             $content->description(trans('admin::lang.create'));
57 57
             $content->body($this->form());
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
      */
66 66
     protected function grid()
67 67
     {
68
-        return Admin::grid(Administrator::class, function (Grid $grid) {
68
+        return Admin::grid(Administrator::class, function(Grid $grid) {
69 69
             $grid->id('ID')->sortable();
70 70
             $grid->username(trans('admin::lang.username'));
71 71
             $grid->name(trans('admin::lang.name'));
72 72
 
73
-            $grid->roles(trans('admin::lang.roles'))->value(function ($roles) {
74
-                $roles = array_map(function ($role) {
73
+            $grid->roles(trans('admin::lang.roles'))->value(function($roles) {
74
+                $roles = array_map(function($role) {
75 75
                     return "<span class='label label-success'>{$role['name']}</span>";
76 76
                 }, $roles);
77 77
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             $grid->created_at(trans('admin::lang.created_at'));
82 82
             $grid->updated_at(trans('admin::lang.updated_at'));
83 83
 
84
-            $grid->rows(function ($row) {
84
+            $grid->rows(function($row) {
85 85
                 if ($row->id == 1) {
86 86
                     $row->actions('edit');
87 87
                 }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public function form()
98 98
     {
99
-        return Admin::form(Administrator::class, function (Form $form) {
99
+        return Admin::form(Administrator::class, function(Form $form) {
100 100
             $form->display('id', 'ID');
101 101
 
102 102
             $form->text('username', trans('admin::lang.username'))->rules('required');
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             $form->display('created_at', trans('admin::lang.created_at'));
109 109
             $form->display('updated_at', trans('admin::lang.updated_at'));
110 110
 
111
-            $form->saving(function (Form $form) {
111
+            $form->saving(function(Form $form) {
112 112
                 if ($form->password && $form->model()->password != $form->password) {
113 113
                     $form->password = bcrypt($form->password);
114 114
                 }
Please login to merge, or discard this patch.
src/Controllers/RoleController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function index()
23 23
     {
24
-        return Admin::content(function (Content $content) {
24
+        return Admin::content(function(Content $content) {
25 25
             $content->header(trans('admin::lang.roles'));
26 26
             $content->description(trans('admin::lang.list'));
27 27
             $content->body($this->grid()->render());
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function edit($id)
39 39
     {
40
-        return Admin::content(function (Content $content) use ($id) {
40
+        return Admin::content(function(Content $content) use ($id) {
41 41
             $content->header(trans('admin::lang.roles'));
42 42
             $content->description(trans('admin::lang.edit'));
43 43
             $content->body($this->form()->edit($id));
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function create()
53 53
     {
54
-        return Admin::content(function (Content $content) {
54
+        return Admin::content(function(Content $content) {
55 55
             $content->header(trans('admin::lang.roles'));
56 56
             $content->description(trans('admin::lang.create'));
57 57
             $content->body($this->form());
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     protected function grid()
67 67
     {
68
-        return Admin::grid(Role::class, function (Grid $grid) {
68
+        return Admin::grid(Role::class, function(Grid $grid) {
69 69
             $grid->id('ID')->sortable();
70 70
             $grid->slug(trans('admin::lang.slug'));
71 71
             $grid->name(trans('admin::lang.name'));
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             $grid->created_at(trans('admin::lang.created_at'));
74 74
             $grid->updated_at(trans('admin::lang.updated_at'));
75 75
 
76
-            $grid->rows(function ($row) {
76
+            $grid->rows(function($row) {
77 77
                 if ($row->slug == 'administrator') {
78 78
                     $row->actions('edit');
79 79
                 }
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function form()
90 90
     {
91
-        return Admin::form(Role::class, function (Form $form) {
91
+        return Admin::form(Role::class, function(Form $form) {
92 92
             $form->display('id', 'ID');
93 93
 
94 94
             $form->text('slug', trans('admin::lang.slug'))->rules('required');
Please login to merge, or discard this patch.