Completed
Push — master ( 52ba0a...f7e181 )
by Vitaliy
06:24
created
src/Components/ExcelExport.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     public function initialize(Grid $grid)
60 60
     {
61 61
         parent::initialize($grid);
62
-        Event::listen(Grid::EVENT_PREPARE, function (Grid $grid) {
62
+        Event::listen(Grid::EVENT_PREPARE, function(Grid $grid) {
63 63
             if ($this->grid !== $grid) {
64 64
                 return;
65 65
             }
@@ -184,10 +184,10 @@  discard block
 block discarded – undo
184 184
 
185 185
     protected function renderExcel()
186 186
     {
187
-        $onSheetCreate = function (LaravelExcelWorksheet $sheet) {
187
+        $onSheetCreate = function(LaravelExcelWorksheet $sheet) {
188 188
             $sheet->fromArray($this->getData(), null, 'A1', false, false);
189 189
         };
190
-        $onFileCreate = function (LaravelExcelWriter $excel) use ($onSheetCreate) {
190
+        $onFileCreate = function(LaravelExcelWriter $excel) use ($onSheetCreate) {
191 191
             $excel->sheet($this->getSheetName(), $onSheetCreate);
192 192
         };
193 193
 
Please login to merge, or discard this patch.
src/Components/Laravel5/Pager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
     protected function setupPaginationForReading()
25 25
     {
26
-        Paginator::currentPageResolver(function () {
26
+        Paginator::currentPageResolver(function() {
27 27
             return Input::get("$this->input_key.page", 1);
28 28
         });
29 29
     }
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         if (isset($input['page'])) {
51 51
             unset($input['page']);
52 52
         }
53
-        return str_replace('/?', '?',$paginator->appends($this->input_key, $input)->render());
53
+        return str_replace('/?', '?', $paginator->appends($this->input_key, $input)->render());
54 54
     }
55 55
 
56 56
     public function initialize(Grid $grid)
Please login to merge, or discard this patch.
src/Components/TotalsRow.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     {
60 60
         $field_names = $this->field_names;
61 61
         $this->fields = $this->grid->getConfig()->getColumns()->filter(
62
-            function (FieldConfig $field) use ($field_names) {
62
+            function(FieldConfig $field) use ($field_names) {
63 63
                 return in_array($field->getName(), $field_names);
64 64
             }
65 65
         );
@@ -76,13 +76,13 @@  discard block
 block discarded – undo
76 76
     {
77 77
         Event::listen(
78 78
             DataProvider::EVENT_FETCH_ROW,
79
-            function (DataRow $row, DataProvider $currentProvider) use ($provider) {
79
+            function(DataRow $row, DataProvider $currentProvider) use ($provider) {
80 80
                 if ($currentProvider !== $provider) return;
81 81
                 $this->rows_processed++;
82 82
                 foreach ($this->fields as $field) {
83 83
                     $name = $field->getName();
84 84
                     $operation = $this->getFieldOperation($name);
85
-                    switch($operation) {
85
+                    switch ($operation) {
86 86
 
87 87
                         case self::OPERATION_SUM:
88 88
                             $this->src[$name] += $row->getCellValue($field);
@@ -217,6 +217,6 @@  discard block
 block discarded – undo
217 217
      */
218 218
     public function getFieldOperation($fieldName)
219 219
     {
220
-        return isset($this->field_operations[$fieldName])?$this->field_operations[$fieldName]:self::OPERATION_SUM;
220
+        return isset($this->field_operations[$fieldName]) ? $this->field_operations[$fieldName] : self::OPERATION_SUM;
221 221
     }
222 222
 }
Please login to merge, or discard this patch.
src/Components/Tr.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
     {
47 47
         $row = $this->getDataRow();
48 48
         $out = '';
49
-        foreach($this->grid->getConfig()->getColumns() as $column) {
49
+        foreach ($this->grid->getConfig()->getColumns() as $column) {
50 50
             $component = new TableCell($column);
51 51
             $component->initialize($this->grid);
52 52
             $component->setContent($column->getValue($row));
Please login to merge, or discard this patch.
src/FieldConfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
      */
150 150
     public function getLabel()
151 151
     {
152
-        return $this->label ? : ucwords(str_replace(array('-', '_', '.'), ' ', $this->name));
152
+        return $this->label ?: ucwords(str_replace(array('-', '_', '.'), ' ', $this->name));
153 153
     }
154 154
 
155 155
     /**
Please login to merge, or discard this patch.
src/ObjectDataRow.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         } else {
28 28
             try {
29 29
                 return $this->src->{$fieldName};
30
-            } catch(Exception $e) {
30
+            } catch (Exception $e) {
31 31
                 throw new RuntimeException(
32 32
                     "Can't read '$fieldName' property from DataRow"
33 33
                 );
Please login to merge, or discard this patch.
resources/views/default/components/filters/date_picker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 /** @var Nayjest\Grids\Components\Filter $component */
3 3
 ?>
4
-<?php if($component->getLabel()): ?>
4
+<?php if ($component->getLabel()): ?>
5 5
     <span><?= $component->getLabel() ?></span>
6 6
 <?php endif ?>
7 7
 <input
Please login to merge, or discard this patch.
src/Components/ColumnsHider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
     {
47 47
         $row = $this->getDataRow();
48 48
         $out = '';
49
-        foreach($this->grid->getConfig()->getColumns() as $column) {
49
+        foreach ($this->grid->getConfig()->getColumns() as $column) {
50 50
             $component = new TableCell($column);
51 51
             $component->initialize($this->grid);
52 52
             $component->setContent($column->getValue($row));
Please login to merge, or discard this patch.
resources/views/default/components/filters/date_range_picker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 /** @var Nayjest\Grids\Components\Filters\DateRangePicker $component */
3 3
 $id = uniqid();
4 4
 ?>
5
-<?php if($component->getLabel()): ?>
5
+<?php if ($component->getLabel()): ?>
6 6
     <span>
7 7
         <span class="glyphicon glyphicon-calendar"></span>
8 8
         <?= $component->getLabel() ?>
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             start.val(picker.startDate.format(options.format));
37 37
             var end = $('[name="<?= $component->getEndInputName() ?>"]')
38 38
             end.val(picker.endDate.format(options.format));
39
-            <?php if($component->isSubmittedOnChange()): ?>
39
+            <?php if ($component->isSubmittedOnChange()): ?>
40 40
             	end.get(0).form.submit();
41 41
             <?php endif ?>
42 42
         };
Please login to merge, or discard this patch.