Skip to content

Commit 457c6fd

Browse files
committed
Reverse selectOnlyNeededColumns()
1 parent c036a15 commit 457c6fd

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/Processors/DataProcessor.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -180,17 +180,7 @@ protected function selectOnlyNeededColumns(array $data)
180180
if (is_null($this->onlyColumns)) {
181181
return $data;
182182
} else {
183-
$dotted_array = array_intersect_key(
184-
array_dot($data),
185-
array_flip(array_merge($this->onlyColumns, $this->exceptions))
186-
);
187-
188-
$nested_array = [];
189-
foreach ($dotted_array as $key => $value) {
190-
array_set($nested_array, $key, $value);
191-
}
192-
193-
return $nested_array;
183+
return array_intersect_key($data, array_flip(array_merge($this->onlyColumns, $this->exceptions)));
194184
}
195185
}
196186

0 commit comments

Comments
 (0)