Various fixes.

This commit is contained in:
James Cole
2018-06-20 16:27:57 +02:00
parent 138f67581c
commit 18f779c6de
8 changed files with 50 additions and 14 deletions

View File

@@ -71,10 +71,13 @@ class CurrencyMapper
return $result;
}
}
if (null === $data['code']) {
return null;
}
// if still nothing, and fields not null, try to create it
$code = $data['code'] ?? null;
$creation = [
'code' => $code,
'code' => $data['code'],
'name' => $data['name'] ?? $code,
'symbol' => $data['symbol'] ?? $code,
'decimal_places' => 2,