Completed
Push — master ( 5b9d51...a4748b )
by Vitaliy
12s
created
src/Components/PhpSpreadsheetExport.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     public function __construct()
34 34
     {
35
-        if(!interface_exists('Maatwebsite\Excel\Exporter')) {
35
+        if (!interface_exists('Maatwebsite\Excel\Exporter')) {
36 36
             throw new \RuntimeException('It seems there is no Maatwebsite v3 installed. Install it or use ExcelExport component');
37 37
         }
38 38
     }
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
         $provider = $this->grid->getConfig()->getDataProvider();
58 58
         $this->resetPagination($provider);
59 59
         $provider->reset();
60
-        while($row = $provider->getRow()) {
60
+        while ($row = $provider->getRow()) {
61 61
             $output = [];
62
-            foreach($columnsConfig as $column) {
62
+            foreach ($columnsConfig as $column) {
63 63
                 if ($this->isColumnExported($column)) {
64 64
                     $output[] = $this->escapeString($column->getValue($row));
65 65
                 }
Please login to merge, or discard this patch.
src/Components/CsvExport.php 1 patch
Spacing   +6 added lines, -6 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
             }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     public function getFileName()
92 92
     {
93
-        return $this->fileName . static::CSV_EXT;
93
+        return $this->fileName.static::CSV_EXT;
94 94
     }
95 95
 
96 96
     /**
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     protected function setCsvHeaders(Response $response)
173 173
     {
174 174
         $response->header('Content-Type', 'application/csv');
175
-        $response->header('Content-Disposition', 'attachment; filename=' . $this->getFileName());
175
+        $response->header('Content-Disposition', 'attachment; filename='.$this->getFileName());
176 176
         $response->header('Pragma', 'no-cache');
177 177
     }
178 178
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         if (version_compare(Application::VERSION, '5.0.0', '<')) {
182 182
             $provider->getPaginationFactory()->setPageName('page_unused');
183 183
         } else {
184
-            Paginator::currentPageResolver(function () {
184
+            Paginator::currentPageResolver(function() {
185 185
                 return 1;
186 186
             });
187 187
         }
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $file = fopen('php://output', 'w');
195 195
 
196 196
         header('Content-Type: text/csv');
197
-        header('Content-Disposition: attachment; filename="'. $this->getFileName() .'"');
197
+        header('Content-Disposition: attachment; filename="'.$this->getFileName().'"');
198 198
         header('Pragma: no-cache');
199 199
 
200 200
         set_time_limit(0);
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
             $output = [];
212 212
             foreach ($this->grid->getConfig()->getColumns() as $column) {
213 213
                 if ($this->isColumnExported($column)) {
214
-                    $output[] = $this->escapeString( $column->getValue($row) );
214
+                    $output[] = $this->escapeString($column->getValue($row));
215 215
                 }
216 216
             }
217 217
             fputcsv($file, $output, static::CSV_DELIMITER);
Please login to merge, or discard this patch.