Passed
Push — master ( 2e22bb...76b84c )
by Nicolaas
02:24
created
src/ExportAllCustomButton.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     {
77 77
         $modelClass = $gridField->getModelClass();
78 78
         $custom = Config::inst()->get(static::class, 'custom_exports');
79
-        if (empty($custom[$modelClass]) || ! is_array($custom[$modelClass])) {
79
+        if (empty($custom[$modelClass]) || !is_array($custom[$modelClass])) {
80 80
             return parent::generateExportFileData($gridField);
81 81
         }
82 82
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $csvWriter->setOutputBOM(Writer::BOM_UTF8);
94 94
 
95 95
         if (!Config::inst()->get(static::class, 'xls_export_disabled')) {
96
-            $csvWriter->addFormatter(function (array $row) {
96
+            $csvWriter->addFormatter(function(array $row) {
97 97
                 foreach ($row as &$item) {
98 98
                     // [SS-2017-007] Sanitise XLS executable column values with a leading tab
99 99
                     if (preg_match('/^[-@=+].*/', $item ?? '')) {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             return $csvWriter->toString();
124 124
         }
125 125
 
126
-        return (string)$csvWriter;
126
+        return (string) $csvWriter;
127 127
     }
128 128
 
129 129
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                     $limit = Config::inst()->get(static::class, 'limit_to_join_tables');
214 214
                     $list = DB::query('SELECT "' . $fieldRelatingToModelExported . '", "' . $fieldRelatingToLookupRelation . '" FROM "' . $joinTable . '" LIMIT ' . $limit);
215 215
                     foreach ($list as $row) {
216
-                        if (! isset($this->lookupTableCache[$joinTable][$row[$fieldRelatingToModelExported]])) {
216
+                        if (!isset($this->lookupTableCache[$joinTable][$row[$fieldRelatingToModelExported]])) {
217 217
                             $this->lookupTableCache[$joinTable][$row[$fieldRelatingToModelExported]] = [];
218 218
                         }
219 219
                         $this->lookupTableCache[$joinTable][$row[$fieldRelatingToModelExported]][] = $row[$fieldRelatingToLookupRelation];
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
                     // local and foreign are swapped here on purpose
225 225
                     $fieldRelatingToLookupRelation = $this->joinTableCache[$classNameForArray]['local'];
226 226
                 }
227
-                if (! empty($this->lookupTableCache[$joinTable][$item->ID])) {
227
+                if (!empty($this->lookupTableCache[$joinTable][$item->ID])) {
228 228
                     foreach ($this->lookupTableCache[$joinTable][$item->ID] as $fieldRelatingToLookupRelation) {
229 229
                         $result[] = $this->lookupTableCache[$classNameForArray][$fieldRelatingToLookupRelation] ?? '';
230 230
                     }
Please login to merge, or discard this patch.