module training - remove unecessary argument in cleanup method

This commit is contained in:
Rodney Figaro 2017-04-13 13:04:54 +02:00
parent 2bc227a188
commit 6e736247bd

View File

@ -43,7 +43,7 @@ class TrainingFixedCodeClient extends ObjectModel
$csv_output->save();
}
static function cleanupCode($code, $enable_replace_empty_value=true)
static function cleanupCode($code)
{
$code = strtolower(trim((string)$code));
@ -66,8 +66,7 @@ class TrainingFixedCodeClient extends ObjectModel
->setExpectedHeader(self::$header)
->setOnEachLine(function(ArrayExtended $cols) use (&$imported_codes) {
$wrong_code = self::cleanupCode($cols[self::CODE_CLIENT_WRONG]);
// clean up, but an empty corrected code must stay empty
$right_code = self::cleanupCode($cols[self::CODE_CLIENT_RIGHT], false);
$right_code = self::cleanupCode($cols[self::CODE_CLIENT_RIGHT]);
if (empty($wrong_code)) {
$wrong_code = self::CODE_EMPTY;