Each CSV converter can set the certainty of their conversion.

This commit is contained in:
James Cole
2016-07-29 21:40:58 +02:00
parent 7707c81b2d
commit 3682467ae3
24 changed files with 1009 additions and 28 deletions

View File

@@ -40,7 +40,7 @@ class CurrencyCode extends BasicConverter implements ConverterInterface
$currency = $repository->find(intval($this->mapping[$value]));
if (!is_null($currency->id)) {
Log::debug('Found currency by ID', ['id' => $currency->id]);
$this->setCertainty(100);
return $currency;
}
}
@@ -49,7 +49,7 @@ class CurrencyCode extends BasicConverter implements ConverterInterface
$currency = $repository->findByCode($value);
if (!is_null($currency->id)) {
Log::debug('Found currency by code', ['id' => $currency->id]);
$this->setCertainty(100);
return $currency;
}
$currency = $repository->store(
@@ -59,6 +59,7 @@ class CurrencyCode extends BasicConverter implements ConverterInterface
'symbol' => $value,
]
);
$this->setCertainty(100);
return $currency;
}