Skip to content

Commit 1cff24d

Browse files
authored
Merge pull request #70 from koenner01/processimport-return-validation
Added return value for the validation result in processImport function
2 parents 9bf5889 + c52f0a6 commit 1cff24d

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)