Skip to content

Commit c52f0a6

Browse files
committed
Added return value for the validation result in processImport function
1 parent 3c069df commit c52f0a6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Model/Importer.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,12 @@ public function setImportAdapterFactory($importAdapterFactory)
111111

112112
public function processImport($dataArray)
113113
{
114-
if ($this->_validateData($dataArray)) {
114+
$validation = $this->_validateData($dataArray);
115+
if ($validation) {
115116
$this->_importData();
116117
}
118+
119+
return $validation;
117120
}
118121

119122
protected function _validateData($dataArray)
@@ -226,4 +229,4 @@ public function getErrorMessages()
226229
return $this->errorMessages;
227230
}
228231

229-
}
232+
}

0 commit comments

Comments
 (0)