Completed
Push — master ( f39186...cee261 )
by Song
02:39
created
src/Show/Field.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     /**
89 89
      * Get name of this column.
90 90
      *
91
-     * @return mixed
91
+     * @return string
92 92
      */
93 93
     public function getName()
94 94
     {
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     /**
113 113
      * Get label of the column.
114 114
      *
115
-     * @return mixed
115
+     * @return string
116 116
      */
117 117
     public function getLabel()
118 118
     {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      */
151 151
     public function using(array $values, $default = null)
152 152
     {
153
-        return $this->as(function ($value) use ($values, $default) {
153
+        return $this->as(function($value) use ($values, $default) {
154 154
             if (is_null($value)) {
155 155
                 return $default;
156 156
             }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      */
171 171
     public function image($server = '', $width = 200, $height = 200)
172 172
     {
173
-        return $this->as(function ($path) use ($server, $width, $height) {
173
+        return $this->as(function($path) use ($server, $width, $height) {
174 174
             if (url()->isValidUrl($path)) {
175 175
                 $src = $path;
176 176
             } elseif ($server) {
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
      */
194 194
     public function link($href = '', $target = '_blank')
195 195
     {
196
-        return $this->as(function ($link) use ($href, $target) {
196
+        return $this->as(function($link) use ($href, $target) {
197 197
             $href = $href ?: $link;
198 198
 
199 199
             return "<a href='$href' target='{$target}'>{$link}</a>";
@@ -209,12 +209,12 @@  discard block
 block discarded – undo
209 209
      */
210 210
     public function label($style = 'success')
211 211
     {
212
-        return $this->as(function ($value) use ($style) {
212
+        return $this->as(function($value) use ($style) {
213 213
             if ($value instanceof Arrayable) {
214 214
                 $value = $value->toArray();
215 215
             }
216 216
 
217
-            return collect((array) $value)->map(function ($name) use ($style) {
217
+            return collect((array) $value)->map(function($name) use ($style) {
218 218
                 return "<span class='label label-{$style}'>$name</span>";
219 219
             })->implode('&nbsp;');
220 220
         });
@@ -229,12 +229,12 @@  discard block
 block discarded – undo
229 229
      */
230 230
     public function badge($style = 'blue')
231 231
     {
232
-        return $this->as(function ($value) use ($style) {
232
+        return $this->as(function($value) use ($style) {
233 233
             if ($value instanceof Arrayable) {
234 234
                 $value = $value->toArray();
235 235
             }
236 236
 
237
-            return collect((array) $value)->map(function ($name) use ($style) {
237
+            return collect((array) $value)->map(function($name) use ($style) {
238 238
                 return "<span class='badge bg-{$style}'>$name</span>";
239 239
             })->implode('&nbsp;');
240 240
         });
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     {
250 250
         $field = $this;
251 251
 
252
-        return $this->as(function ($value) use ($field) {
252
+        return $this->as(function($value) use ($field) {
253 253
 
254 254
             $content = json_decode($value, true);
255 255
 
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
     public function render()
339 339
     {
340 340
         if ($this->showAs->isNotEmpty()) {
341
-            $this->showAs->each(function ($callable) {
341
+            $this->showAs->each(function($callable) {
342 342
                 $this->value = $callable->call(
343 343
                     $this->parent->getModel(),
344 344
                     $this->value
Please login to merge, or discard this patch.
src/Show/Panel.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
     /**
139 139
      * Fill fields to panel.
140 140
      *
141
-     * @param []Field $fields
141
+     * @param Collection $fields
142 142
      *
143 143
      * @return $this
144 144
      */
Please login to merge, or discard this patch.
src/Grid/Tools/BatchActions.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     /**
53 53
      * Add a batch action.
54 54
      *
55
-     * @param $title
55
+     * @param BatchDelete $title
56 56
      * @param BatchAction|null $action
57 57
      *
58 58
      * @return $this
Please login to merge, or discard this patch.
src/Grid/Filter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     {
208 208
         $inputs = array_dot(Input::all());
209 209
 
210
-        $inputs = array_filter($inputs, function ($input) {
210
+        $inputs = array_filter($inputs, function($input) {
211 211
             return $input !== '' && !is_null($input);
212 212
         });
213 213
 
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
             $conditions[] = $filter->condition($params);
232 232
         }
233 233
 
234
-        return tap(array_filter($conditions), function ($conditions) {
234
+        return tap(array_filter($conditions), function($conditions) {
235 235
             $this->searching = !empty($conditions);
236 236
         });
237 237
     }
@@ -247,9 +247,9 @@  discard block
 block discarded – undo
247 247
             return $inputs;
248 248
         }
249 249
 
250
-        $inputs = collect($inputs)->filter(function ($input, $key) {
250
+        $inputs = collect($inputs)->filter(function($input, $key) {
251 251
             return starts_with($key, "{$this->name}_");
252
-        })->mapWithKeys(function ($val, $key) {
252
+        })->mapWithKeys(function($val, $key) {
253 253
             $key = str_replace("{$this->name}_", '', $key);
254 254
 
255 255
             return [$key => $val];
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
      */
300 300
     public function scope($key, $label = '')
301 301
     {
302
-        return tap(new Scope($key, $label), function (Scope $scope) {
302
+        return tap(new Scope($key, $label), function(Scope $scope) {
303 303
             return $this->scopes->push($scope);
304 304
         });
305 305
     }
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
     {
324 324
         $key = request(Scope::QUERY_NAME);
325 325
 
326
-        return $this->scopes->first(function ($scope) use ($key) {
326
+        return $this->scopes->first(function($scope) use ($key) {
327 327
             return $scope->key == $key;
328 328
         });
329 329
     }
Please login to merge, or discard this patch.
src/Grid/Filter/Scope.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
      */
56 56
     public function condition()
57 57
     {
58
-        return $this->queries->map(function ($query) {
58
+        return $this->queries->map(function($query) {
59 59
             return [$query['method'] => $query['arguments']];
60 60
         })->toArray();
61 61
     }
Please login to merge, or discard this patch.
src/Form/Tools.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -288,7 +288,7 @@
 block discarded – undo
288 288
             return '';
289 289
         }
290 290
 
291
-        return $tools->map(function ($tool) {
291
+        return $tools->map(function($tool) {
292 292
             if ($tool instanceof Renderable) {
293 293
                 return $tool->render();
294 294
             }
Please login to merge, or discard this patch.
src/Show/Tools.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -275,7 +275,7 @@
 block discarded – undo
275 275
      */
276 276
     protected function renderCustomTools($tools)
277 277
     {
278
-        return $tools->map(function ($tool) {
278
+        return $tools->map(function($tool) {
279 279
             if ($tool instanceof Renderable) {
280 280
                 return $tool->render();
281 281
             }
Please login to merge, or discard this patch.