Completed
Pull Request — master (#2296)
by Song
03:18
created
src/Console/FormCommand.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     /**
25 25
      * Execute the console command.
26 26
      *
27
-     * @return bool
27
+     * @return false|null
28 28
      */
29 29
     public function handle()
30 30
     {
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
      * Check if the table column contains the specified keywords of the array.
168 168
      *
169 169
      * @param string $haystack
170
-     * @param array  $needle
170
+     * @param string[]  $needle
171 171
      *
172 172
      * @return bool
173 173
      */
Please login to merge, or discard this patch.
src/Form.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
      *
266 266
      * @param $id
267 267
      *
268
-     * @return mixed
268
+     * @return boolean
269 269
      */
270 270
     public function destroy($id)
271 271
     {
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
     /**
305 305
      * Store a new record.
306 306
      *
307
-     * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\Http\JsonResponse
307
+     * @return Response
308 308
      */
309 309
     public function store()
310 310
     {
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
      *
370 370
      * @param array $data
371 371
      *
372
-     * @return mixed
372
+     * @return Response|null
373 373
      */
374 374
     protected function prepare($data = [])
375 375
     {
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
     /**
548 548
      * Get RedirectResponse after update.
549 549
      *
550
-     * @param mixed $key
550
+     * @param integer $key
551 551
      *
552 552
      * @return \Illuminate\Http\RedirectResponse
553 553
      */
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -292,9 +292,9 @@  discard block
 block discarded – undo
292 292
         $data = $this->model->with($this->getRelations())
293 293
             ->findOrFail($id)->toArray();
294 294
 
295
-        $this->builder->fields()->filter(function ($field) {
295
+        $this->builder->fields()->filter(function($field) {
296 296
             return $field instanceof Field\File;
297
-        })->each(function (Field\File $file) use ($data) {
297
+        })->each(function(Field\File $file) use ($data) {
298 298
             $file->setOriginal($data);
299 299
 
300 300
             $file->destroy();
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
             return $response;
320 320
         }
321 321
 
322
-        DB::transaction(function () {
322
+        DB::transaction(function() {
323 323
             $inserts = $this->prepareInsert($this->updates);
324 324
 
325 325
             foreach ($inserts as $column => $value) {
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
             return $response;
507 507
         }
508 508
 
509
-        DB::transaction(function () {
509
+        DB::transaction(function() {
510 510
             $updates = $this->prepareUpdate($this->updates);
511 511
 
512 512
             foreach ($updates as $column => $value) {
@@ -939,7 +939,7 @@  discard block
 block discarded – undo
939 939
     protected function getFieldByColumn($column)
940 940
     {
941 941
         return $this->builder->fields()->first(
942
-            function (Field $field) use ($column) {
942
+            function(Field $field) use ($column) {
943 943
                 if (is_array($field->column())) {
944 944
                     return in_array($column, $field->column());
945 945
                 }
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
 
961 961
         $values = $this->model->toArray();
962 962
 
963
-        $this->builder->fields()->each(function (Field $field) use ($values) {
963
+        $this->builder->fields()->each(function(Field $field) use ($values) {
964 964
             $field->setOriginal($values);
965 965
         });
966 966
     }
@@ -982,7 +982,7 @@  discard block
 block discarded – undo
982 982
 
983 983
         $data = $this->model->toArray();
984 984
 
985
-        $this->builder->fields()->each(function (Field $field) use ($data) {
985
+        $this->builder->fields()->each(function(Field $field) use ($data) {
986 986
             if (!in_array($field->column(), $this->ignored)) {
987 987
                 $field->fill($data);
988 988
             }
@@ -1105,7 +1105,7 @@  discard block
 block discarded – undo
1105 1105
      */
1106 1106
     public function setWidth($fieldWidth = 8, $labelWidth = 2)
1107 1107
     {
1108
-        $this->builder()->fields()->each(function ($field) use ($fieldWidth, $labelWidth) {
1108
+        $this->builder()->fields()->each(function($field) use ($fieldWidth, $labelWidth) {
1109 1109
             /* @var Field $field  */
1110 1110
             $field->setWidth($fieldWidth, $labelWidth);
1111 1111
         });
Please login to merge, or discard this patch.
src/Show/Field.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
      */
173 173
     public function using(array $values, $default = null)
174 174
     {
175
-        return $this->as(function ($value) use ($values, $default) {
175
+        return $this->as(function($value) use ($values, $default) {
176 176
             if (is_null($value)) {
177 177
                 return $default;
178 178
             }
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
      */
193 193
     public function image($server = '', $width = 200, $height = 200)
194 194
     {
195
-        return $this->as(function ($path) use ($server, $width, $height) {
195
+        return $this->as(function($path) use ($server, $width, $height) {
196 196
             if (url()->isValidUrl($path)) {
197 197
                 $src = $path;
198 198
             } elseif ($server) {
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     {
218 218
         $field = $this;
219 219
 
220
-        return $this->as(function ($path) use ($server, $download, $field) {
220
+        return $this->as(function($path) use ($server, $download, $field) {
221 221
             $name = basename($path);
222 222
 
223 223
             $field->wrapped = false;
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
      */
266 266
     public function link($href = '', $target = '_blank')
267 267
     {
268
-        return $this->as(function ($link) use ($href, $target) {
268
+        return $this->as(function($link) use ($href, $target) {
269 269
             $href = $href ?: $link;
270 270
 
271 271
             return "<a href='$href' target='{$target}'>{$link}</a>";
@@ -281,12 +281,12 @@  discard block
 block discarded – undo
281 281
      */
282 282
     public function label($style = 'success')
283 283
     {
284
-        return $this->as(function ($value) use ($style) {
284
+        return $this->as(function($value) use ($style) {
285 285
             if ($value instanceof Arrayable) {
286 286
                 $value = $value->toArray();
287 287
             }
288 288
 
289
-            return collect((array) $value)->map(function ($name) use ($style) {
289
+            return collect((array) $value)->map(function($name) use ($style) {
290 290
                 return "<span class='label label-{$style}'>$name</span>";
291 291
             })->implode('&nbsp;');
292 292
         });
@@ -301,12 +301,12 @@  discard block
 block discarded – undo
301 301
      */
302 302
     public function badge($style = 'blue')
303 303
     {
304
-        return $this->as(function ($value) use ($style) {
304
+        return $this->as(function($value) use ($style) {
305 305
             if ($value instanceof Arrayable) {
306 306
                 $value = $value->toArray();
307 307
             }
308 308
 
309
-            return collect((array) $value)->map(function ($name) use ($style) {
309
+            return collect((array) $value)->map(function($name) use ($style) {
310 310
                 return "<span class='badge bg-{$style}'>$name</span>";
311 311
             })->implode('&nbsp;');
312 312
         });
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
     {
322 322
         $field = $this;
323 323
 
324
-        return $this->as(function ($value) use ($field) {
324
+        return $this->as(function($value) use ($field) {
325 325
             $content = json_decode($value, true);
326 326
 
327 327
             if (json_last_error() == 0) {
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
     public function render()
433 433
     {
434 434
         if ($this->showAs->isNotEmpty()) {
435
-            $this->showAs->each(function ($callable) {
435
+            $this->showAs->each(function($callable) {
436 436
                 $this->value = $callable->call(
437 437
                     $this->parent->getModel(),
438 438
                     $this->value
Please login to merge, or discard this patch.