Strict comparisons.

This commit is contained in:
James Cole
2017-07-15 16:41:07 +02:00
parent c03ab269f0
commit 22144b78ea
59 changed files with 110 additions and 107 deletions

View File

@@ -36,10 +36,10 @@ class Amount implements ConverterInterface
$decimalPosition = $len - 3;
$decimal = null;
if (($len > 2 && $value{$decimalPosition} == '.') || ($len > 2 && strpos($value, '.') > $decimalPosition)) {
if (($len > 2 && $value{$decimalPosition} === '.') || ($len > 2 && strpos($value, '.') > $decimalPosition)) {
$decimal = '.';
}
if ($len > 2 && $value{$decimalPosition} == ',') {
if ($len > 2 && $value{$decimalPosition} === ',') {
$decimal = ',';
}

View File

@@ -42,7 +42,7 @@ class AssetAccountIbans implements MapperInterface
if (strlen($iban) > 0) {
$topList[$account->id] = $account->iban . ' (' . $account->name . ')';
}
if (strlen($iban) == 0) {
if (strlen($iban) === 0) {
$list[$account->id] = $account->name;
}
}

View File

@@ -48,7 +48,7 @@ class OpposingAccountIbans implements MapperInterface
if (strlen($iban) > 0) {
$topList[$account->id] = $account->iban . ' (' . $account->name . ')';
}
if (strlen($iban) == 0) {
if (strlen($iban) === 0) {
$list[$account->id] = $account->name;
}
}

View File

@@ -152,11 +152,9 @@ class ImportRoutine
Log::debug(sprintf('Linking journal #%d to tag #%d...', $journalId, $tagId));
DB::table('tag_transaction_journal')->insert(['transaction_journal_id' => $journalId, 'tag_id' => $tagId]);
}
Log::debug('Done!');
Log::info(sprintf('Linked %d journals to tag #%d ("%s")', $this->journals->count(), $tag->id, $tag->tag));
return $tag;
}
/**

View File

@@ -103,7 +103,7 @@ class AbnAmroDescription implements SpecificInterface
$this->row[8] = $matches[4]; // 'opposing-account-name'
$this->row[7] = $matches[4]; // 'description'
if ($matches[1] == 'GEA') {
if ($matches[1] === 'GEA') {
$this->row[7] = 'GEA ' . $matches[4]; // 'description'
}