Basic storage routine works, basic file handling.

This commit is contained in:
James Cole
2018-05-10 09:10:16 +02:00
parent 116f7ed613
commit cabcb9c6d0
16 changed files with 278 additions and 157 deletions

View File

@@ -68,7 +68,8 @@ class TransactionCurrencyFactory
$currencyCode = (string)$currencyCode;
$currencyId = (int)$currencyId;
if (\strlen($currencyCode) === 0 && (int)$currencyId === 0) {
if ('' === $currencyCode && $currencyId === 0) {
Log::warning('Cannot find anything on empty currency code and empty currency ID!');
return null;
}
@@ -78,6 +79,7 @@ class TransactionCurrencyFactory
if (null !== $currency) {
return $currency;
}
Log::warning(sprintf('Currency ID is %d but found nothing!', $currencyId));
}
// then by code:
if (\strlen($currencyCode) > 0) {
@@ -85,7 +87,9 @@ class TransactionCurrencyFactory
if (null !== $currency) {
return $currency;
}
Log::warning(sprintf('Currency code is %d but found nothing!', $currencyCode));
}
Log::warning('Found nothing for currency.');
return null;
}