@@ -76,7 +76,7 @@ discard block |
||
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 |
||
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 |
||
123 | 123 | return $csvWriter->toString(); |
124 | 124 | } |
125 | 125 | |
126 | - return (string)$csvWriter; |
|
126 | + return (string) $csvWriter; |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | $limit = Config::inst()->get(static::class, 'limit_to_join_tables'); |
208 | 208 | $list = DB::query('SELECT "' . $localIDField . '", "' . $foreignIDField . '" FROM "' . $joinTable . '" LIMIT ' . $limit); |
209 | 209 | foreach ($list as $row) { |
210 | - if (! isset($this->lookupTableCache[$joinTable][$row[$localIDField]])) { |
|
210 | + if (!isset($this->lookupTableCache[$joinTable][$row[$localIDField]])) { |
|
211 | 211 | $this->lookupTableCache[$joinTable][$row[$localIDField]] = []; |
212 | 212 | } |
213 | 213 | $this->lookupTableCache[$joinTable][$row[$localIDField]][] = $row[$foreignIDField]; |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | $joinTable = $this->joinTableCache[$className]['table']; |
217 | 217 | $foreignIDField = $this->joinTableCache[$className]['foreign']; |
218 | 218 | } |
219 | - if (! empty($this->lookupTableCache[$joinTable][$item->ID])) { |
|
219 | + if (!empty($this->lookupTableCache[$joinTable][$item->ID])) { |
|
220 | 220 | foreach ($this->lookupTableCache[$joinTable][$item->ID] as $foreignID) { |
221 | 221 | $result[] = $this->lookupTableCache[$className][$foreignID] ?? ''; |
222 | 222 | } |
@@ -78,19 +78,19 @@ discard block |
||
78 | 78 | if (!in_array($fieldName, $this->exportFieldLabelsExclude, true)) { |
79 | 79 | switch ($type) { |
80 | 80 | case Image::class: |
81 | - $this->exportFields[$fieldName] = function ($rel) { |
|
82 | - return Director::absoluteURL((string)$rel->Link()); |
|
81 | + $this->exportFields[$fieldName] = function($rel) { |
|
82 | + return Director::absoluteURL((string) $rel->Link()); |
|
83 | 83 | }; |
84 | 84 | |
85 | 85 | break; |
86 | 86 | case Member::class: |
87 | - $this->exportFields[$fieldName] = function ($rel) { |
|
87 | + $this->exportFields[$fieldName] = function($rel) { |
|
88 | 88 | return $rel->Email; |
89 | 89 | }; |
90 | 90 | |
91 | 91 | break; |
92 | 92 | default: |
93 | - $this->exportFields[$fieldName] = function ($rel) { |
|
93 | + $this->exportFields[$fieldName] = function($rel) { |
|
94 | 94 | return $rel->getTitle(); |
95 | 95 | }; |
96 | 96 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $sepReplacer = Config::inst()->get(ExportAllFromModelAdminTraitSettings::class, 'export_separator_replacer'); |
109 | 109 | foreach (array_keys($rels) as $fieldName) { |
110 | 110 | if (!in_array($fieldName, $this->exportFieldLabelsExclude, true)) { |
111 | - $this->exportFields[$fieldName] = function ($rels) use ($sep, $sepReplacer): string { |
|
111 | + $this->exportFields[$fieldName] = function($rels) use ($sep, $sepReplacer): string { |
|
112 | 112 | $a = []; |
113 | 113 | foreach ($rels as $rel) { |
114 | 114 | $a[] = str_replace((string) $sep, (string) $sepReplacer, (string) $rel->getTitle()); |