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

@@ -52,7 +52,7 @@ class RemoveTag implements ActionInterface
/** @var Tag $tag */
$tag = $journal->user->tags()->get()->filter(
function (Tag $tag) use ($name) {
return $tag->tag == $name;
return $tag->tag === $name;
}
)->first();

View File

@@ -56,7 +56,7 @@ class SetBudget implements ActionInterface
$budgets = $repository->getActiveBudgets();
$budget = $budgets->filter(
function (Budget $current) use ($search) {
return $current->name == $search;
return $current->name === $search;
}
)->first();
if (is_null($budget)) {
@@ -65,7 +65,7 @@ class SetBudget implements ActionInterface
return true;
}
if ($journal->transactionType->type == TransactionType::TRANSFER) {
if ($journal->transactionType->type === TransactionType::TRANSFER) {
Log::debug(sprintf('RuleAction SetBudget could not set budget of journal #%d to "%s" because journal is a transfer.', $journal->id, $search));
return true;