Completed
Pull Request — master (#4435)
by Muhlis
07:58
created
src/Grid/Tools/Selector.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
      * @param string $column
58 58
      * @param string $label
59 59
      * @param array  $options
60
-     * @param null   $query
60
+     * @param null|\Closure   $query
61 61
      * @param string $type
62 62
      *
63 63
      * @return $this
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -93,18 +93,18 @@  discard block
 block discarded – undo
93 93
      */
94 94
     public static function parseSelected()
95 95
     {
96
-        if (! is_null(static::$selected)) {
96
+        if (!is_null(static::$selected)) {
97 97
             return static::$selected;
98 98
         }
99 99
 
100 100
         $selected = request('_selector', []);
101 101
 
102
-        if (! is_array($selected)) {
102
+        if (!is_array($selected)) {
103 103
             return [];
104 104
         }
105 105
 
106
-        $selected = array_filter($selected, function ($value) {
107
-            return ! is_null($value);
106
+        $selected = array_filter($selected, function($value) {
107
+            return !is_null($value);
108 108
         });
109 109
 
110 110
         foreach ($selected as &$value) {
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             array_push($options, $value);
145 145
         }
146 146
 
147
-        if (! empty($options)) {
147
+        if (!empty($options)) {
148 148
             Arr::set($query, "_selector.{$column}", implode(',', $options));
149 149
         } else {
150 150
             Arr::forget($query, "_selector.{$column}");
Please login to merge, or discard this patch.
src/Show/Tools.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -289,7 +289,7 @@
 block discarded – undo
289 289
      *
290 290
      * @param Collection $tools
291 291
      *
292
-     * @return mixed
292
+     * @return string
293 293
      */
294 294
     protected function renderCustomTools($tools)
295 295
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     {
107 107
         if ($disable) {
108 108
             array_delete($this->tools, 'list');
109
-        } elseif (! in_array('list', $this->tools)) {
109
+        } elseif (!in_array('list', $this->tools)) {
110 110
             array_push($this->tools, 'list');
111 111
         }
112 112
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     {
123 123
         if ($disable) {
124 124
             array_delete($this->tools, 'delete');
125
-        } elseif (! in_array('delete', $this->tools)) {
125
+        } elseif (!in_array('delete', $this->tools)) {
126 126
             array_push($this->tools, 'delete');
127 127
         }
128 128
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     {
139 139
         if ($disable) {
140 140
             array_delete($this->tools, 'edit');
141
-        } elseif (! in_array('edit', $this->tools)) {
141
+        } elseif (!in_array('edit', $this->tools)) {
142 142
             array_push($this->tools, 'edit');
143 143
         }
144 144
 
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
      */
294 294
     protected function renderCustomTools($tools)
295 295
     {
296
-        return $tools->map(function ($tool) {
296
+        return $tools->map(function($tool) {
297 297
             if ($tool instanceof Renderable) {
298 298
                 return $tool->render();
299 299
             }
Please login to merge, or discard this patch.
src/Grid/Displayers/Label.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
             $this->value = $this->value->toArray();
14 14
         }
15 15
 
16
-        return collect((array) $this->value)->map(function ($item) use ($style) {
16
+        return collect((array) $this->value)->map(function($item) use ($style) {
17 17
             if (is_array($style)) {
18 18
                 if (is_string($this->getColumn()->getOriginal()) || is_int($this->getColumn()->getOriginal())) {
19 19
                     $style = Arr::get($style, $this->getColumn()->getOriginal(), 'success');
Please login to merge, or discard this patch.
src/Actions/RowAction.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     /**
41 41
      * Set row model.
42 42
      *
43
-     * @param mixed $key
43
+     * @param string $key
44 44
      *
45 45
      * @return \Illuminate\Database\Eloquent\Model|mixed
46 46
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
      */
111 111
     public function retrieveModel(Request $request)
112 112
     {
113
-        if (! $key = $request->get('_key')) {
113
+        if (!$key = $request->get('_key')) {
114 114
             return false;
115 115
         }
116 116
 
Please login to merge, or discard this patch.
src/Extension.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -390,7 +390,7 @@
 block discarded – undo
390 390
      *
391 391
      * @param       $name
392 392
      * @param       $slug
393
-     * @param       $path
393
+     * @param       string $path
394 394
      * @param array $methods
395 395
      */
396 396
     protected static function createPermission($name, $slug, $path, $methods = [])
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     {
93 93
         $class = get_called_class();
94 94
 
95
-        if (! isset(self::$instance[$class]) || ! self::$instance[$class] instanceof $class) {
95
+        if (!isset(self::$instance[$class]) || !self::$instance[$class] instanceof $class) {
96 96
             self::$instance[$class] = new static();
97 97
         }
98 98
 
@@ -112,11 +112,11 @@  discard block
 block discarded – undo
112 112
             return false;
113 113
         }
114 114
 
115
-        if (! empty($css = $extension->css())) {
115
+        if (!empty($css = $extension->css())) {
116 116
             Admin::css($css);
117 117
         }
118 118
 
119
-        if (! empty($js = $extension->js())) {
119
+        if (!empty($js = $extension->js())) {
120 120
             Admin::js($js);
121 121
         }
122 122
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
      */
207 207
     public function disabled()
208 208
     {
209
-        return ! $this->enabled();
209
+        return !$this->enabled();
210 210
     }
211 211
 
212 212
     /**
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
     public static function import()
237 237
     {
238 238
         $extension = static::getInstance();
239
-        DB::transaction(function () use ($extension) {
239
+        DB::transaction(function() use ($extension) {
240 240
             if ($menu = $extension->menu()) {
241 241
                 if ($extension->validateMenu($menu)) {
242 242
                     extract($menu);
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      */
310 310
     public function validatePermission(array $permission)
311 311
     {
312
-        if (! empty($permission['method'])) {
312
+        if (!empty($permission['method'])) {
313 313
             $permission['method'] = array_map('strtoupper', $permission['method']);
314 314
         }
315 315
 
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
             'icon'      => $icon,
371 371
             'uri'       => $uri,
372 372
         ]);
373
-        if (! empty($children)) {
373
+        if (!empty($children)) {
374 374
             $extension = static::getInstance();
375 375
             foreach ($children as $child) {
376 376
                 if ($extension->validateMenu($child)) {
Please login to merge, or discard this patch.
src/Form/Layout/Layout.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
     /**
90 90
      * Remove reserved fields from form layout.
91 91
      *
92
-     * @param array $fields
92
+     * @param string[] $fields
93 93
      */
94 94
     public function removeReservedFields(array $fields)
95 95
     {
Please login to merge, or discard this patch.
src/Form/Layout/Column.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
      */
49 49
     public function removeFields($fields)
50 50
     {
51
-        $this->fields = $this->fields->reject(function (Field $field) use ($fields) {
51
+        $this->fields = $this->fields->reject(function(Field $field) use ($fields) {
52 52
             return in_array($field->column(), $fields);
53 53
         });
54 54
     }
Please login to merge, or discard this patch.
src/Console/CreateUserCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         if (empty($selectedOption)) {
43 43
             $selected = $this->choice('Please choose a role for the user', $selectedOption, null, null, true);
44 44
 
45
-            $roles = $roles->filter(function ($role) use ($selected) {
45
+            $roles = $roles->filter(function($role) use ($selected) {
46 46
                 return in_array($role->name, $selected);
47 47
             });
48 48
         }
Please login to merge, or discard this patch.
src/Actions/GridAction.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     }
46 46
 
47 47
     /**
48
-     * @return mixed
48
+     * @return string
49 49
      */
50 50
     protected function getModelClass()
51 51
     {
Please login to merge, or discard this patch.