Completed
Push — master ( 155d74...73c1de )
by Vitaliy
8s
created
src/Components/CsvExport.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function initialize(Grid $grid)
51 51
     {
52 52
         parent::initialize($grid);
53
-        Event::listen(Grid::EVENT_PREPARE, function (Grid $grid) {
53
+        Event::listen(Grid::EVENT_PREPARE, function(Grid $grid) {
54 54
             if ($this->grid !== $grid) {
55 55
                 return;
56 56
             }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function getFileName()
77 77
     {
78
-        return $this->fileName . static::CSV_EXT;
78
+        return $this->fileName.static::CSV_EXT;
79 79
     }
80 80
 
81 81
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     protected function setCsvHeaders(Response $response)
101 101
     {
102 102
         $response->header('Content-Type', 'application/csv');
103
-        $response->header('Content-Disposition', 'attachment; filename=' . $this->getFileName());
103
+        $response->header('Content-Disposition', 'attachment; filename='.$this->getFileName());
104 104
         $response->header('Pragma', 'no-cache');
105 105
     }
106 106
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         if (version_compare(Application::VERSION, '5.0.0', '<')) {
110 110
             $provider->getPaginationFactory()->setPageName('page_unused');
111 111
         } else {
112
-            Paginator::currentPageResolver(function () {
112
+            Paginator::currentPageResolver(function() {
113 113
                 return 1;
114 114
             });
115 115
         }
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         $file = fopen('php://output', 'w');
123 123
 
124 124
         header('Content-Type: text/csv');
125
-        header('Content-Disposition: attachment; filename="'. $this->getFileName() .'"');
125
+        header('Content-Disposition: attachment; filename="'.$this->getFileName().'"');
126 126
         header('Pragma: no-cache');
127 127
 
128 128
         set_time_limit(0);
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
             $output = [];
140 140
             foreach ($this->grid->getConfig()->getColumns() as $column) {
141 141
                 if (!$column->isHidden()) {
142
-                    $output[] = $this->escapeString( $column->getValue($row) );
142
+                    $output[] = $this->escapeString($column->getValue($row));
143 143
                 }
144 144
             }
145 145
             fputcsv($file, $output, static::CSV_DELIMITER);
Please login to merge, or discard this patch.
src/Components/ExcelExport.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     public function initialize(Grid $grid)
66 66
     {
67 67
         parent::initialize($grid);
68
-        Event::listen(Grid::EVENT_PREPARE, function (Grid $grid) {
68
+        Event::listen(Grid::EVENT_PREPARE, function(Grid $grid) {
69 69
             if ($this->grid !== $grid) {
70 70
                 return;
71 71
             }
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         if (version_compare(Application::VERSION, '5.0.0', '<')) {
158 158
             $provider->getPaginationFactory()->setPageName('page_unused');
159 159
         } else {
160
-            Paginator::currentPageResolver(function () {
160
+            Paginator::currentPageResolver(function() {
161 161
                 return 1;
162 162
             });
163 163
         }
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
     public function getOnFileCreate()
273 273
     {
274 274
         if ($this->on_file_create === null) {
275
-            $this->on_file_create = function (LaravelExcelWriter $excel) {
275
+            $this->on_file_create = function(LaravelExcelWriter $excel) {
276 276
                 $excel->sheet($this->getSheetName(), $this->getOnSheetCreate());
277 277
             };
278 278
         }
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
     public function getOnSheetCreate()
297 297
     {
298 298
         if ($this->on_sheet_create === null) {
299
-            $this->on_sheet_create = function (LaravelExcelWorksheet $sheet) {
299
+            $this->on_sheet_create = function(LaravelExcelWorksheet $sheet) {
300 300
                 $sheet->fromArray($this->getData(), null, 'A1', false, false);
301 301
             };
302 302
         }
Please login to merge, or discard this patch.