@@ -86,19 +86,19 @@ discard block |
||
| 86 | 86 | if (!in_array($fieldName, $this->exportFieldLabelsExclude, true)) { |
| 87 | 87 | switch ($type) { |
| 88 | 88 | case Image::class: |
| 89 | - $this->exportFields[$fieldName] = function ($rel) { |
|
| 90 | - return Director::absoluteURL((string)$rel->Link()); |
|
| 89 | + $this->exportFields[$fieldName] = function($rel) { |
|
| 90 | + return Director::absoluteURL((string) $rel->Link()); |
|
| 91 | 91 | }; |
| 92 | 92 | |
| 93 | 93 | break; |
| 94 | 94 | case Member::class: |
| 95 | - $this->exportFields[$fieldName] = function ($rel) { |
|
| 95 | + $this->exportFields[$fieldName] = function($rel) { |
|
| 96 | 96 | return $rel->Email; |
| 97 | 97 | }; |
| 98 | 98 | |
| 99 | 99 | break; |
| 100 | 100 | default: |
| 101 | - $this->exportFields[$fieldName] = function ($rel) { |
|
| 101 | + $this->exportFields[$fieldName] = function($rel) { |
|
| 102 | 102 | return $rel->getTitle(); |
| 103 | 103 | }; |
| 104 | 104 | } |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | ; |
| 116 | 116 | foreach (array_keys($rels) as $fieldName) { |
| 117 | 117 | if (!in_array($fieldName, $this->exportFieldLabelsExclude, true)) { |
| 118 | - $this->exportFields[$fieldName] = function ($rels) { |
|
| 118 | + $this->exportFields[$fieldName] = function($rels) { |
|
| 119 | 119 | $sep = Config::inst()->get(ExportAllFromModelAdminTraitSettings::class, 'export_separator'); |
| 120 | 120 | $sepReplacer = Config::inst()->get(ExportAllFromModelAdminTraitSettings::class, 'export_separator_replacer'); |
| 121 | 121 | $a = []; |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | $csvWriter->setOutputBOM(Writer::BOM_UTF8); |
| 92 | 92 | |
| 93 | 93 | if (!Config::inst()->get(static::class, 'xls_export_disabled')) { |
| 94 | - $csvWriter->addFormatter(function (array $row) { |
|
| 94 | + $csvWriter->addFormatter(function(array $row) { |
|
| 95 | 95 | foreach ($row as &$item) { |
| 96 | 96 | // [SS-2017-007] Sanitise XLS executable column values with a leading tab |
| 97 | 97 | if (preg_match('/^[-@=+].*/', $item ?? '')) { |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | return $csvWriter->toString(); |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | - return (string)$csvWriter; |
|
| 124 | + return (string) $csvWriter; |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | $limit = Config::inst()->get(static::class, 'limit_to_join_tables'); |
| 206 | 206 | $list = DB::query('SELECT "' . $localIDField . '", "' . $foreignIDField . '" FROM "' . $joinTable . '" LIMIT ' . $limit); |
| 207 | 207 | foreach ($list as $row) { |
| 208 | - if (! isset($this->lookupTableCache[$joinTable][$row[$localIDField]])) { |
|
| 208 | + if (!isset($this->lookupTableCache[$joinTable][$row[$localIDField]])) { |
|
| 209 | 209 | $this->lookupTableCache[$joinTable][$row[$localIDField]] = []; |
| 210 | 210 | } |
| 211 | 211 | $this->lookupTableCache[$joinTable][$row[$localIDField]][] = $row[$foreignIDField]; |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | $joinTable = $this->joinTableCache[$className]['table']; |
| 215 | 215 | $foreignIDField = $this->joinTableCache[$className]['foreign']; |
| 216 | 216 | } |
| 217 | - if (! empty($this->lookupTableCache[$joinTable][$item->ID])) { |
|
| 217 | + if (!empty($this->lookupTableCache[$joinTable][$item->ID])) { |
|
| 218 | 218 | foreach ($this->lookupTableCache[$joinTable][$item->ID] as $foreignID) { |
| 219 | 219 | $result[] = $this->lookupTableCache[$className][$foreignID] ?? ''; |
| 220 | 220 | } |