Completed
Push — master ( 8187a2...82be35 )
by Song
02:30
created
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/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/Console/ConfigCommand.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -57,6 +57,10 @@
 block discarded – undo
57 57
             });
58 58
     }
59 59
 
60
+    /**
61
+     * @param string $title
62
+     * @param \Illuminate\Support\Collection $diff
63
+     */
60 64
     protected function printDiff($title, $diff, $error = false)
61 65
     {
62 66
         if ($diff->isEmpty()) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     {
53 53
         return collect(Arr::dot($from))
54 54
             ->keys()
55
-            ->reject(function ($key) use ($to) {
55
+            ->reject(function($key) use ($to) {
56 56
                 return Arr::has($to, $key);
57 57
             });
58 58
     }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $this->line('');
67 67
         $this->comment("{$title}:");
68 68
 
69
-        $diff->each(function ($key) use ($error) {
69
+        $diff->each(function($key) use ($error) {
70 70
             if ($error) {
71 71
                 $this->error("    {$key}");
72 72
             } else {
Please login to merge, or discard this patch.
src/Form/Field/CanCascadeFields.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
      */
103 103
     protected function applyCascadeConditions()
104 104
     {
105
-        if( $this->form ) {
105
+        if ($this->form) {
106 106
             $this->form->fields()
107
-                ->filter(function (Form\Field $field) {
107
+                ->filter(function(Form\Field $field) {
108 108
                     return $field instanceof CascadeGroup
109 109
                         && $field->dependsOn($this)
110 110
                         && $this->hitsCondition($field);
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             return;
163 163
         }
164 164
 
165
-        $cascadeGroups = collect($this->conditions)->map(function ($condition) {
165
+        $cascadeGroups = collect($this->conditions)->map(function($condition) {
166 166
             return [
167 167
                 'class'    => $this->getCascadeClass($condition['value']),
168 168
                 'operator' => $condition['operator'],
Please login to merge, or discard this patch.
src/Traits/HasAssets.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -315,7 +315,7 @@
 block discarded – undo
315 315
     }
316 316
 
317 317
     /**
318
-     * @param $component
318
+     * @param string $component
319 319
      */
320 320
     public static function component($component, $data = [])
321 321
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
         $script = collect(static::$script)
234 234
             ->merge(static::$deferredScript)
235 235
             ->unique()
236
-            ->map(function ($line) {
236
+            ->map(function($line) {
237 237
                 //@see https://stackoverflow.com/questions/19509863/how-to-remove-js-comments-using-php
238 238
                 $pattern = '/(?:(?:\/\*(?:[^*]|(?:\*+[^*\/]))*\*+\/)|(?:(?<!\:|\\\|\')\/\/.*))/';
239 239
                 $line = preg_replace($pattern, '', $line);
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 
258 258
         $style = collect(static::$style)
259 259
             ->unique()
260
-            ->map(function ($line) {
260
+            ->map(function($line) {
261 261
                 return preg_replace('/\s+/', ' ', $line);
262 262
             });
263 263
 
@@ -339,10 +339,10 @@  discard block
 block discarded – undo
339 339
         $dom = new \DOMDocument();
340 340
 
341 341
         libxml_use_internal_errors(true);
342
-        $dom->loadHTML('<?xml encoding="utf-8" ?>' . $string);
342
+        $dom->loadHTML('<?xml encoding="utf-8" ?>'.$string);
343 343
         libxml_use_internal_errors(false);
344 344
 
345
-        if(! $body = $dom->getElementsByTagName('body')->item(0)) {
345
+        if (!$body = $dom->getElementsByTagName('body')->item(0)) {
346 346
             return;
347 347
         }
348 348
 
Please login to merge, or discard this patch.
src/Form/Field.php 1 patch
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
      *
283 283
      * @param string $column
284 284
      *
285
-     * @return mixed|string
285
+     * @return string
286 286
      */
287 287
     protected function formatColumn($column = '')
288 288
     {
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
     }
592 592
 
593 593
     /**
594
-     * @param string|array|Closure $input
594
+     * @param callable|null $input
595 595
      * @param string|array         $original
596 596
      *
597 597
      * @return array|Closure
@@ -802,7 +802,7 @@  discard block
 block discarded – undo
802 802
     /**
803 803
      * Set or get value of the field.
804 804
      *
805
-     * @param null $value
805
+     * @param string $value
806 806
      *
807 807
      * @return mixed
808 808
      */
@@ -973,7 +973,7 @@  discard block
 block discarded – undo
973 973
     /**
974 974
      * Add html attributes to elements.
975 975
      *
976
-     * @param array|string $attribute
976
+     * @param string $attribute
977 977
      * @param mixed        $value
978 978
      *
979 979
      * @return $this
@@ -1103,7 +1103,7 @@  discard block
 block discarded – undo
1103 1103
     /**
1104 1104
      * Get placeholder.
1105 1105
      *
1106
-     * @return mixed
1106
+     * @return string
1107 1107
      */
1108 1108
     public function getPlaceholder()
1109 1109
     {
@@ -1360,7 +1360,7 @@  discard block
 block discarded – undo
1360 1360
     }
1361 1361
 
1362 1362
     /**
1363
-     * @param array $labelClass
1363
+     * @param string[] $labelClass
1364 1364
      *
1365 1365
      * @return self
1366 1366
      */
@@ -1414,7 +1414,7 @@  discard block
 block discarded – undo
1414 1414
      *
1415 1415
      * @param string $view
1416 1416
      *
1417
-     * @return string
1417
+     * @return Field
1418 1418
      */
1419 1419
     public function setView($view): self
1420 1420
     {
Please login to merge, or discard this patch.
src/Form/Field/HasValuePicker.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Encore\Admin\Admin;
6 6
 use Encore\Admin\Form\Field;
7
-use Illuminate\Support\Arr;
8 7
 
9 8
 /**
10 9
  * @mixin Field
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
     }
65 65
 
66 66
     /**
67
-     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View|string
67
+     * @return null|string
68 68
      */
69 69
     protected function renderFilePicker()
70 70
     {
Please login to merge, or discard this patch.
src/Form/Field/PlainInput.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     protected $append;
16 16
 
17 17
     /**
18
-     * @param mixed $string
18
+     * @param string $string
19 19
      *
20 20
      * @return $this
21 21
      */
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     }
30 30
 
31 31
     /**
32
-     * @param mixed $string
32
+     * @param string $string
33 33
      * @return $this
34 34
      */
35 35
     public function append($string)
Please login to merge, or discard this patch.
src/Form/Field/Textarea.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,6 @@
 block discarded – undo
59 59
     }
60 60
 
61 61
     /**
62
-     * @param string $wrap
63 62
      */
64 63
     protected function addPickBtn($btn)
65 64
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             $this->value = json_encode($this->value, JSON_PRETTY_PRINT);
49 49
         }
50 50
 
51
-        $this->mountPicker(function ($btn) {
51
+        $this->mountPicker(function($btn) {
52 52
             $this->addPickBtn($btn);
53 53
         });
54 54
 
Please login to merge, or discard this patch.