Completed
Pull Request — master (#1114)
by Song
02:35
created
src/Grid/Filter.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
      * @param string $method
110 110
      * @param array  $arguments
111 111
      *
112
-     * @return $this
112
+     * @return AbstractFilter|null
113 113
      */
114 114
     public function __call($method, $arguments)
115 115
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
     {
116 116
         $inputs = array_dot(Input::all());
117 117
 
118
-        $inputs = array_filter($inputs, function ($input) {
118
+        $inputs = array_filter($inputs, function($input) {
119 119
             return $input !== '' && !is_null($input);
120 120
         });
121 121
 
Please login to merge, or discard this patch.
src/Grid/Filter/Between.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 
55 55
         $this->value = array_get($inputs, $this->column);
56 56
 
57
-        $value = array_filter($this->value, function ($val) {
57
+        $value = array_filter($this->value, function($val) {
58 58
             return $val !== '';
59 59
         });
60 60
 
Please login to merge, or discard this patch.
src/Grid/Filter/AbstractFilter.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@
 block discarded – undo
158 158
 
159 159
         list($relation, $args[0]) = explode('.', $this->column);
160 160
 
161
-        return ['whereHas' => [$relation, function ($relation) use ($args) {
161
+        return ['whereHas' => [$relation, function($relation) use ($args) {
162 162
             call_user_func_array([$relation, $this->query], $args);
163 163
         }]];
164 164
     }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@
 block discarded – undo
181 181
     /**
182 182
      * Get field object of filter.
183 183
      *
184
-     * @return mixed
184
+     * @return Text
185 185
      */
186 186
     public function field()
187 187
     {
Please login to merge, or discard this patch.
src/Grid/Row.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
     public function style($style)
135 135
     {
136 136
         if (is_array($style)) {
137
-            $style = implode('', array_map(function ($key, $val) {
137
+            $style = implode('', array_map(function($key, $val) {
138 138
                 return "$key:$val";
139 139
             }, array_keys($style), array_values($style)));
140 140
         }
Please login to merge, or discard this patch.
src/Widgets/Box.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
             return $this->style([$styles]);
65 65
         }
66 66
 
67
-        $styles = array_map(function ($style) {
67
+        $styles = array_map(function($style) {
68 68
             return 'box-'.$style;
69 69
         }, $styles);
70 70
 
Please login to merge, or discard this patch.
src/Auth/Permission.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
      *
13 13
      * @param $permission
14 14
      *
15
-     * @return true
15
+     * @return boolean|null
16 16
      */
17 17
     public static function check($permission)
18 18
     {
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      *
31 31
      * @param $roles
32 32
      *
33
-     * @return true
33
+     * @return boolean|null
34 34
      */
35 35
     public static function allow($roles)
36 36
     {
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      *
49 49
      * @param $roles
50 50
      *
51
-     * @return true
51
+     * @return boolean|null
52 52
      */
53 53
     public static function deny($roles)
54 54
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         }
23 23
 
24 24
         if (is_array($permission)) {
25
-            collect($permission)->each(function ($permission) {
25
+            collect($permission)->each(function($permission) {
26 26
                 call_user_func([Permission::class, 'check'], $permission);
27 27
             });
28 28
 
Please login to merge, or discard this patch.
src/Widgets/Form.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
     /**
118 118
      * Add form attributes.
119 119
      *
120
-     * @param string|array $attr
120
+     * @param string $attr
121 121
      * @param string       $value
122 122
      *
123 123
      * @return $this
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      */
163 163
     public function setWidth($fieldWidth = 8, $labelWidth = 2)
164 164
     {
165
-        collect($this->fields)->each(function ($field) use ($fieldWidth, $labelWidth) {
165
+        collect($this->fields)->each(function($field) use ($fieldWidth, $labelWidth) {
166 166
             /* @var Field $field  */
167 167
             $field->setWidth($fieldWidth, $labelWidth);
168 168
         });
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
      *
196 196
      * @return $this
197 197
      */
198
-    protected function pushField(Field &$field)
198
+    protected function pushField(Field & $field)
199 199
     {
200 200
         array_push($this->fields, $field);
201 201
 
Please login to merge, or discard this patch.
src/Grid/Model.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
     /**
241 241
      * Resolve perPage for pagination.
242 242
      *
243
-     * @param array|null $paginate
243
+     * @param Model $paginate
244 244
      *
245 245
      * @return array
246 246
      */
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
     /**
263 263
      * Find query by method name.
264 264
      *
265
-     * @param $method
265
+     * @param string $method
266 266
      *
267 267
      * @return static
268 268
      */
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $this->setSort();
195 195
         $this->setPaginate();
196 196
 
197
-        $this->queries->unique()->each(function ($query) {
197
+        $this->queries->unique()->each(function($query) {
198 198
             $this->model = call_user_func_array([$this->model, $query['method']], $query['arguments']);
199 199
         });
200 200
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
     {
219 219
         $paginate = $this->findQueryByMethod('paginate');
220 220
 
221
-        $this->queries = $this->queries->reject(function ($query) {
221
+        $this->queries = $this->queries->reject(function($query) {
222 222
             return $query['method'] == 'paginate';
223 223
         });
224 224
 
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
      */
269 269
     protected function findQueryByMethod($method)
270 270
     {
271
-        return $this->queries->first(function ($query) use ($method) {
271
+        return $this->queries->first(function($query) use ($method) {
272 272
             return $query['method'] == $method;
273 273
         });
274 274
     }
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
     {
314 314
         list($relationName, $relationColumn) = explode('.', $column);
315 315
 
316
-        if ($this->queries->contains(function ($query) use ($relationName) {
316
+        if ($this->queries->contains(function($query) use ($relationName) {
317 317
             return $query['method'] == 'with' && in_array($relationName, $query['arguments']);
318 318
         })) {
319 319
             $relation = $this->model->$relationName();
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
      */
343 343
     public function resetOrderBy()
344 344
     {
345
-        $this->queries = $this->queries->reject(function ($query) {
345
+        $this->queries = $this->queries->reject(function($query) {
346 346
             return $query['method'] == 'orderBy';
347 347
         });
348 348
     }
Please login to merge, or discard this patch.
src/Auth/Database/HasPermissions.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
      *
130 130
      * @param array $roles
131 131
      *
132
-     * @return mixed
132
+     * @return boolean
133 133
      */
134 134
     public function inRoles($roles = [])
135 135
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
      */
58 58
     public function allPermissions()
59 59
     {
60
-        return $this->roles->map(function ($role) {
60
+        return $this->roles->map(function($role) {
61 61
             return $role->permissions;
62 62
         })->flatten()->merge($this->permissions);
63 63
     }
Please login to merge, or discard this patch.