Various code cleanup.

This commit is contained in:
James Cole
2018-07-27 05:03:37 +02:00
parent 0312ba8ad7
commit e3e0e12fef
43 changed files with 167 additions and 145 deletions

View File

@@ -226,7 +226,6 @@ class ImportTransaction
* Calculate the amount of this transaction.
*
* @return string
* @throws FireflyException
*/
public function calculateAmount(): string
{
@@ -258,7 +257,7 @@ class ImportTransaction
if ($conversion === -1) {
$result = app('steam')->negative($result);
}
if ($conversion === 1) {
if (1 === $conversion) {
$result = app('steam')->positive($result);
}
Log::debug(sprintf('convertedAmount after conversion is %s', $result));
@@ -301,7 +300,7 @@ class ImportTransaction
if ($conversion === -1) {
$result = app('steam')->negative($result);
}
if ($conversion === 1) {
if (1 === $conversion) {
$result = app('steam')->positive($result);
}
Log::debug(sprintf('Foreign amount after conversion is %s', $result));