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

@@ -124,7 +124,7 @@ class BudgetController extends Controller
*/
public function budgetLimit(Budget $budget, BudgetLimit $budgetLimit)
{
if ($budgetLimit->budget->id != $budget->id) {
if ($budgetLimit->budget->id !== $budget->id) {
throw new FireflyException('This budget limit is not part of this budget.');
}

View File

@@ -67,7 +67,7 @@ class CategoryController extends Controller
$start = $repository->firstUseDate($category);
if ($start->year == 1900) {
if ($start->year === 1900) {
$start = new Carbon;
}

View File

@@ -247,7 +247,7 @@ class CategoryReportController extends Controller
// remove all empty entries to prevent cluttering:
$newSet = [];
foreach ($chartData as $key => $entry) {
if (!array_sum($entry['entries']) == 0) {
if (!array_sum($entry['entries']) === 0) {
$newSet[$key] = $chartData[$key];
}
}

View File

@@ -231,7 +231,7 @@ class TagReportController extends Controller
// remove all empty entries to prevent cluttering:
$newSet = [];
foreach ($chartData as $key => $entry) {
if (!array_sum($entry['entries']) == 0) {
if (!array_sum($entry['entries']) === 0) {
$newSet[$key] = $chartData[$key];
}
}