Skip to content

Commit 48e1677

Browse files
committed
MAGETWO-88905: Import Customer ("gender" field) issue
- Fixed static test
1 parent 6c2fd1d commit 48e1677

File tree

1 file changed

+15
-12
lines changed
  • app/code/Magento/CustomerImportExport/Model/Import

1 file changed

+15
-12
lines changed

app/code/Magento/CustomerImportExport/Model/Import/Customer.php

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,12 @@ private function getCustomerEntityFieldsToUpdate(array $entitiesToUpdate): array
288288
{
289289
$firstCustomer = reset($entitiesToUpdate);
290290
$columnsToUpdate = array_keys($firstCustomer);
291-
$customerFieldsToUpdate = array_filter($this->customerFields, function ($field) use ($columnsToUpdate) {
292-
return in_array($field, $columnsToUpdate);
293-
});
291+
$customerFieldsToUpdate = array_filter(
292+
$this->customerFields,
293+
function ($field) use ($columnsToUpdate) {
294+
return in_array($field, $columnsToUpdate);
295+
}
296+
);
294297
return $customerFieldsToUpdate;
295298
}
296299

@@ -523,9 +526,9 @@ protected function _importData()
523526
$attributesToSave[$tableName] = [];
524527
}
525528
$attributesToSave[$tableName] = array_diff_key(
526-
$attributesToSave[$tableName],
527-
$customerAttributes
528-
) + $customerAttributes;
529+
$attributesToSave[$tableName],
530+
$customerAttributes
531+
) + $customerAttributes;
529532
}
530533
}
531534
}
@@ -582,12 +585,12 @@ protected function _validateRowForUpdate(array $rowData, $rowNumber)
582585
}
583586
// check password
584587
if (isset(
585-
$rowData['password']
586-
) && strlen(
587-
$rowData['password']
588-
) && $this->string->strlen(
589-
$rowData['password']
590-
) < self::MIN_PASSWORD_LENGTH
588+
$rowData['password']
589+
) && strlen(
590+
$rowData['password']
591+
) && $this->string->strlen(
592+
$rowData['password']
593+
) < self::MIN_PASSWORD_LENGTH
591594
) {
592595
$this->addRowError(self::ERROR_PASSWORD_LENGTH, $rowNumber);
593596
}

0 commit comments

Comments
 (0)