Skip to content

Commit cf36ced

Browse files
committed
Remove redundant flip
1 parent b4a33e8 commit cf36ced

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/Migration/Sources/CSV.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,17 +172,14 @@ private function exportDocuments(int $batchSize): void
172172
$relationType === 'manyToMany' &&
173173
$relationSide === 'parent'
174174
) {
175-
$manyToManyKeys[] = $key;
175+
$manyToManyKeys[$key] = true;
176176
}
177177

178178
if ($isArray && $type !== Attribute::TYPE_RELATIONSHIP) {
179-
$arrayKeys[] = $key;
179+
$arrayKeys[$key] = true;
180180
}
181181
}
182-
183-
$manyToManyKeys = \array_flip($manyToManyKeys);
184-
$arrayKeys = \array_flip($arrayKeys);
185-
182+
186183
$this->withCSVStream(function ($stream) use ($attributeTypes, $manyToManyKeys, $arrayKeys, $collection, $batchSize) {
187184
$headers = fgetcsv($stream);
188185
if (! is_array($headers) || count($headers) === 0) {

0 commit comments

Comments
 (0)