Completed
Pull Request — master (#218)
by
unknown
02:34
created
src/Grid.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
 
356 356
         $data = $this->processFilter();
357 357
 
358
-        $this->columns->map(function (Column $column) use (&$data) {
358
+        $this->columns->map(function(Column $column) use (&$data) {
359 359
             $data = $column->fill($data);
360 360
 
361 361
             $this->columnNames[] = $column->getName();
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
      */
388 388
     protected function buildRows(array $data)
389 389
     {
390
-        $this->rows = collect($data)->map(function ($val, $key) {
390
+        $this->rows = collect($data)->map(function($val, $key) {
391 391
             $row = new Row($key, $val);
392 392
 
393 393
             $row->setKeyName($this->keyName);
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
             ->push($perPage)
672 672
             ->unique()
673 673
             ->sort()
674
-            ->map(function ($option) use ($perPage) {
674
+            ->map(function($option) use ($perPage) {
675 675
                 $selected = ($option == $perPage) ? 'selected' : '';
676 676
                 $url = app('request')->fullUrlWithQuery([$this->model->getPerPageName() => $option]);
677 677
 
Please login to merge, or discard this patch.
src/Grid/Model.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         $this->setSort();
197 197
         $this->setPaginate();
198 198
 
199
-        $this->queries->unique()->each(function ($query) {
199
+        $this->queries->unique()->each(function($query) {
200 200
             $this->model = call_user_func_array([$this->model, $query['method']], $query['arguments']);
201 201
         });
202 202
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
     {
221 221
         $paginate = $this->findQueryByMethod('paginate');
222 222
 
223
-        $this->queries = $this->queries->reject(function ($query) {
223
+        $this->queries = $this->queries->reject(function($query) {
224 224
             return $query['method'] == 'paginate';
225 225
         });
226 226
 
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 
258 258
             $this->perPage = $perPage;
259 259
         }
260
-        if(isset($paginate['arguments'][0])){
260
+        if (isset($paginate['arguments'][0])) {
261 261
             return $paginate['arguments'];
262 262
         }
263 263
 
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
      */
274 274
     protected function findQueryByMethod($method)
275 275
     {
276
-        return $this->queries->first(function ($query) use ($method) {
276
+        return $this->queries->first(function($query) use ($method) {
277 277
             return $query['method'] == $method;
278 278
         });
279 279
     }
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
     {
318 318
         list($relationName, $relationColumn) = explode('.', $column);
319 319
 
320
-        if ($this->queries->contains(function ($query) use ($relationName) {
320
+        if ($this->queries->contains(function($query) use ($relationName) {
321 321
             return $query['method'] == 'with' && in_array($relationName, $query['arguments']);
322 322
         })) {
323 323
             $relation = $this->model->$relationName();
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
      */
347 347
     public function resetOrderBy()
348 348
     {
349
-        $this->queries = $this->queries->reject(function ($query) {
349
+        $this->queries = $this->queries->reject(function($query) {
350 350
             return $query['method'] == 'orderBy';
351 351
         });
352 352
     }
Please login to merge, or discard this patch.