Completed
Pull Request — master (#1350)
by
unknown
02:38
created
src/Grid.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 
272 272
             $relation = $this->model()->eloquent()->$relationName();
273 273
 
274
-            $label = $this->setLabel($label,$relationColumn);
274
+            $label = $this->setLabel($label, $relationColumn);
275 275
 //            $label = empty($label) ? ucfirst($relationColumn) : $label;
276 276
             $name = snake_case($relationName).'.'.$relationColumn;
277 277
         }
@@ -286,16 +286,16 @@  discard block
 block discarded – undo
286 286
         return $column;
287 287
     }
288 288
 
289
-    public function setLabel($label , $relationColumn)
289
+    public function setLabel($label, $relationColumn)
290 290
     {
291
-        $trans_key = 'validation.attributes.' . $relationColumn;
291
+        $trans_key = 'validation.attributes.'.$relationColumn;
292 292
         $trans_key_low = strtolower($trans_key);
293 293
          if (empty($label) && Lang::has($trans_key)) {
294 294
              $label = Lang::get($trans_key);
295 295
          }
296 296
          if (empty($label) && Lang::has($trans_key_low)) {
297 297
             $label = Lang::get($trans_key_low);
298
-        }else if (empty($label)) {
298
+        } else if (empty($label)) {
299 299
              $label = ucfirst($relationColumn);
300 300
          }
301 301
         return $label;
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
         $callback = $this->actionsCallback;
455 455
         $column = $this->addColumn('__actions__', trans('admin.action'));
456 456
 
457
-        $column->display(function ($value) use ($grid, $column, $callback) {
457
+        $column->display(function($value) use ($grid, $column, $callback) {
458 458
             $actions = new Actions($value, $grid, $column, $this);
459 459
 
460 460
             return $actions->display($callback);
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
      */
469 469
     public function disableRowSelector()
470 470
     {
471
-        $this->tools(function ($tools) {
471
+        $this->tools(function($tools) {
472 472
             /* @var Grid\Tools $tools */
473 473
             $tools->disableBatchActions();
474 474
         });
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
         $column = new Column(Column::SELECT_COLUMN_NAME, ' ');
493 493
         $column->setGrid($this);
494 494
 
495
-        $column->display(function ($value) use ($grid, $column) {
495
+        $column->display(function($value) use ($grid, $column) {
496 496
             $actions = new RowSelector($value, $grid, $column, $this);
497 497
 
498 498
             return $actions->display();
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
 
520 520
         Column::setOriginalGridData($data);
521 521
 
522
-        $this->columns->map(function (Column $column) use (&$data) {
522
+        $this->columns->map(function(Column $column) use (&$data) {
523 523
             $data = $column->fill($data);
524 524
 
525 525
             $this->columnNames[] = $column->getName();
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
      */
598 598
     protected function buildRows(array $data)
599 599
     {
600
-        $this->rows = collect($data)->map(function ($model, $number) {
600
+        $this->rows = collect($data)->map(function($model, $number) {
601 601
             return new Row($number, $model);
602 602
         });
603 603
 
@@ -895,7 +895,7 @@  discard block
 block discarded – undo
895 895
     public function __call($method, $arguments)
896 896
     {
897 897
         $label = isset($arguments[0]) ? $arguments[0] : null;
898
-        $label = $this->setLabel($label,$method);
898
+        $label = $this->setLabel($label, $method);
899 899
 
900 900
         if ($this->model()->eloquent() instanceof MongodbModel) {
901 901
             return $this->addColumn($method, $label);
Please login to merge, or discard this patch.
src/Widgets/Form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
      */
166 166
     public function setWidth($fieldWidth = 8, $labelWidth = 2)
167 167
     {
168
-        collect($this->fields)->each(function ($field) use ($fieldWidth, $labelWidth) {
168
+        collect($this->fields)->each(function($field) use ($fieldWidth, $labelWidth) {
169 169
             /* @var Field $field */
170 170
             $field->setWidth($fieldWidth, $labelWidth);
171 171
         });
Please login to merge, or discard this patch.
src/Form/Tab.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     {
48 48
         $fields = $this->collectFields($content);
49 49
 
50
-        $id = 'form-' . ($this->tabs->count() + 1);
50
+        $id = 'form-'.($this->tabs->count() + 1);
51 51
         //if define tab and row inside of tab ,you cant define row in form or simple field in tab
52 52
         $rows = $this->form->builder()->getRows();
53 53
         $this->form->builder()->setRows([]);
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     public function getTabs()
85 85
     {
86 86
         // If there is no active tab, then active the first.
87
-        if ($this->tabs->filter(function ($tab) {
87
+        if ($this->tabs->filter(function($tab) {
88 88
             return $tab['active'];
89 89
         })->isEmpty()) {
90 90
             $first = $this->tabs->first();
Please login to merge, or discard this patch.