Completed
Push — master ( 9a42b3...71797f )
by Song
02:37
created
src/Widgets/ContainsForms.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      * @param array $forms
14 14
      * @param null  $active
15 15
      *
16
-     * @return mixed
16
+     * @return ContainsForms
17 17
      */
18 18
     public static function forms($forms, $active = null)
19 19
     {
Please login to merge, or discard this patch.
src/Controllers/MenuController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
         return $content
27 27
             ->title(trans('admin.menu'))
28 28
             ->description(trans('admin.list'))
29
-            ->row(function (Row $row) {
29
+            ->row(function(Row $row) {
30 30
                 $row->column(6, $this->treeView()->render());
31 31
 
32
-                $row->column(6, function (Column $column) {
32
+                $row->column(6, function(Column $column) {
33 33
                     $form = new \Encore\Admin\Widgets\Form();
34 34
                     $form->action(admin_url('auth/menu'));
35 35
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
         $tree->disableCreate();
77 77
 
78
-        $tree->branch(function ($branch) {
78
+        $tree->branch(function($branch) {
79 79
             $payload = "<i class='fa {$branch['icon']}'></i>&nbsp;<strong>{$branch['title']}</strong>";
80 80
 
81 81
             if (!isset($branch['children'])) {
Please login to merge, or discard this patch.
src/Console/GenerateMenuCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function handle()
50 50
     {
51
-        $routes = collect($this->router->getRoutes())->filter(function (Route $route) {
51
+        $routes = collect($this->router->getRoutes())->filter(function(Route $route) {
52 52
             $uri = $route->uri();
53 53
             // built-in, parameterized and no-GET are ignored
54 54
             return Str::startsWith($uri, 'admin/')
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                 && !Str::contains($uri, '{')
58 58
                 && in_array('GET', $route->methods());
59 59
         })
60
-            ->map(function (Route $route) {
60
+            ->map(function(Route $route) {
61 61
                 $uri = substr($route->uri(), strlen('admin/'));
62 62
 
63 63
                 return [
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
         $menus = Menu::all()->pluck('title', 'uri');
73 73
         // exclude exist ones
74
-        $news = $routes->diffKeys($menus)->map(function ($item, $key) {
74
+        $news = $routes->diffKeys($menus)->map(function($item, $key) {
75 75
             return [
76 76
                 'title' => $item,
77 77
                 'uri'   => $key,
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         } else {
86 86
             if ($this->hasOption('dry-run') && $this->option('dry-run')) {
87 87
                 $this->line('<info>The following menu items will be created</info>: ');
88
-                $this->table(['Title', 'Uri'], array_map(function ($item) {
88
+                $this->table(['Title', 'Uri'], array_map(function($item) {
89 89
                     return [
90 90
                         $item['title'],
91 91
                         $item['uri'],
Please login to merge, or discard this patch.
src/Form/Field/MultipleFile.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
         // for create or update
156 156
         if ($this->pathColumn) {
157
-            $targets = array_map(function ($target) {
157
+            $targets = array_map(function($target) {
158 158
                 return [$this->pathColumn => $target];
159 159
             }, $targets);
160 160
         }
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
     {
186 186
         $this->name = $this->getStoreName($file);
187 187
 
188
-        return tap($this->upload($file), function () {
188
+        return tap($this->upload($file), function() {
189 189
             $this->name = null;
190 190
         });
191 191
     }
Please login to merge, or discard this patch.
src/Grid/Actions/Delete.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         ];
30 30
 
31 31
         try {
32
-            DB::transaction(function () use ($model) {
32
+            DB::transaction(function() use ($model) {
33 33
                 $model->delete();
34 34
             });
35 35
         } catch (\Exception $exception) {
Please login to merge, or discard this patch.
src/Grid/Exporters/CsvExporter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -139,16 +139,16 @@  discard block
 block discarded – undo
139 139
             call_user_func($this->callback, $this);
140 140
         }
141 141
 
142
-        $response = function () {
142
+        $response = function() {
143 143
             $handle = fopen('php://output', 'w');
144 144
             $titles = [];
145 145
 
146
-            $this->chunk(function ($collection) use ($handle, &$titles) {
146
+            $this->chunk(function($collection) use ($handle, &$titles) {
147 147
                 Column::setOriginalGridModels($collection);
148 148
 
149 149
                 $original = $current = $collection->toArray();
150 150
 
151
-                $this->grid->getColumns()->map(function (Column $column) use (&$current) {
151
+                $this->grid->getColumns()->map(function(Column $column) use (&$current) {
152 152
                     $current = $column->fill($current);
153 153
                     $this->grid->columnNames[] = $column->getName();
154 154
                 });
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
     protected function getVisiableTitles()
178 178
     {
179 179
         $titles = $this->grid->visibleColumns()
180
-            ->mapWithKeys(function (Column $column) {
180
+            ->mapWithKeys(function(Column $column) {
181 181
                 return [$column->getName() => $column->getLabel()];
182 182
             });
183 183
 
Please login to merge, or discard this patch.
src/Grid/Selectable.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             $this->disablePagination();
87 87
         }
88 88
 
89
-        $this->tools(function (Tools $tools) {
89
+        $this->tools(function(Tools $tools) {
90 90
             $tools->append(new Grid\Selectable\BrowserBtn());
91 91
         });
92 92
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $hide = $hide ? 'hide' : '';
99 99
         $key = $this->key;
100 100
 
101
-        $this->column('__remove__', ' ')->display(function () use ($hide, $key) {
101
+        $this->column('__remove__', ' ')->display(function() use ($hide, $key) {
102 102
             return <<<BTN
103 103
 <a href="javascript:void(0);" class="grid-row-remove {$hide}" data-key="{$this->getAttribute($key)}">
104 104
     <i class="fa fa-trash"></i>
Please login to merge, or discard this patch.
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,6 @@
 block discarded – undo
67 67
     }
68 68
 
69 69
     /**
70
-     * @param bool $multiple
71 70
      *
72 71
      * @return string
73 72
      */
Please login to merge, or discard this patch.
src/Grid/Displayers/AbstractDisplayer.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
     }
80 80
 
81 81
     /**
82
-     * @param mixed $key
82
+     * @param string $key
83 83
      *
84 84
      * @return mixed
85 85
      */
Please login to merge, or discard this patch.
src/Grid/Displayers/Expand.php 1 patch
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,6 @@  discard block
 block discarded – undo
42 42
     }
43 43
 
44 44
     /**
45
-     * @param int $multiple
46 45
      *
47 46
      * @return string
48 47
      */
@@ -80,6 +79,9 @@  discard block
 block discarded – undo
80 79
         Admin::script($script);
81 80
     }
82 81
 
82
+    /**
83
+     * @param boolean $isExpand
84
+     */
83 85
     protected function addScript($isExpand)
84 86
     {
85 87
         $script = <<<SCRIPT
Please login to merge, or discard this patch.