Completed
Pull Request — master (#4913)
by
unknown
02:38
created
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   +5 added lines, -5 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) {return $line;
236
+            ->map(function($line) {return $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,7 +339,7 @@  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 345
         if ($head = $dom->getElementsByTagName('head')->item(0)) {
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 
370 370
         $render = '';
371 371
 
372
-        if($body = $dom->getElementsByTagName('body')->item(0)) {
372
+        if ($body = $dom->getElementsByTagName('body')->item(0)) {
373 373
             foreach ($body->childNodes as $child) {
374 374
                 if ($child instanceof \DOMElement) {
375 375
                     if ($child->tagName == 'style' && !empty($child->nodeValue)) {
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
                     }
379 379
 
380 380
                     if ($child->tagName == 'script' && !empty($child->nodeValue)) {
381
-                        static::script(';(function () {' . $child->nodeValue . '})();');
381
+                        static::script(';(function () {'.$child->nodeValue.'})();');
382 382
                         continue;
383 383
                     }
384 384
 
Please login to merge, or discard this patch.
src/Form/Field/HasValuePicker.php 1 patch
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.
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.
src/Form/Field/ValuePicker.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,6 @@
 block discarded – undo
55 55
     }
56 56
 
57 57
     /**
58
-     * @param int $multiple
59 58
      *
60 59
      * @return string
61 60
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
             $value = explode($this->separator, $value);
126 126
         }
127 127
 
128
-        return collect(Arr::wrap($value))->map(function ($item) use ($field) {
128
+        return collect(Arr::wrap($value))->map(function($item) use ($field) {
129 129
             return [
130 130
                 'url'     => $this->field->objectUrl($item),
131 131
                 'value'   => $item,
Please login to merge, or discard this patch.
src/Grid/Displayers/Expand.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,6 @@
 block discarded – undo
55 55
     }
56 56
 
57 57
     /**
58
-     * @param int $multiple
59 58
      *
60 59
      * @return string
61 60
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         return Admin::component('admin::components.column-expand', [
28 28
             'key'           => $this->getKey(),
29 29
             'url'           => $this->getLoadUrl(),
30
-            'name'          => str_replace('.', '-', $this->getName()) . '-' . $this->getKey(),
30
+            'name'          => str_replace('.', '-', $this->getName()).'-'.$this->getKey(),
31 31
             'html'          => $html,
32 32
             'value'         => $this->value,
33 33
             'async'         => $async,
Please login to merge, or discard this patch.
src/Grid/Displayers/Modal.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             $title = $this->trans('title');
39 39
         }
40 40
 
41
-        $html  = '';
41
+        $html = '';
42 42
 
43 43
         if ($async = is_subclass_of($callback, Renderable::class)) {
44 44
             $this->renderable = $callback;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             'html'    => $html,
55 55
             'key'     => $this->getKey(),
56 56
             'value'   => $this->value,
57
-            'name'    => $this->getKey() . '-' . str_replace('.', '_', $this->getColumn()->getName()),
57
+            'name'    => $this->getKey().'-'.str_replace('.', '_', $this->getColumn()->getName()),
58 58
         ]);
59 59
     }
60 60
 }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@  discard block
 block discarded – undo
14 14
     protected $renderable;
15 15
 
16 16
     /**
17
-     * @param int $multiple
18 17
      *
19 18
      * @return string
20 19
      */
@@ -28,7 +27,7 @@  discard block
 block discarded – undo
28 27
     /**
29 28
      * @param \Closure|string $callback
30 29
      *
31
-     * @return mixed|string
30
+     * @return string
32 31
      */
33 32
     public function display($callback = null)
34 33
     {
Please login to merge, or discard this patch.