From e69b2ccf43d29a43c6076271eceb85c4325bc4c7 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Mon, 10 Jun 2019 17:59:44 +0200 Subject: [PATCH] Scrutiniser recommendations (#1004) --- samples/Autofilter/10_Autofilter_selection_1.php | 2 +- samples/Autofilter/10_Autofilter_selection_2.php | 2 +- samples/Autofilter/10_Autofilter_selection_display.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/Autofilter/10_Autofilter_selection_1.php b/samples/Autofilter/10_Autofilter_selection_1.php index 7a88403e..464b8c18 100644 --- a/samples/Autofilter/10_Autofilter_selection_1.php +++ b/samples/Autofilter/10_Autofilter_selection_1.php @@ -127,7 +127,7 @@ $autoFilter->getColumn('C') // Filter the Date column on a filter value of the first day of every period of the current year // We us a dateGroup ruletype for this, although it is still a standard filter foreach ($periods as $period) { - $endDate = date('t', mktime(0, 0, 0, $period, 1, $currentYear)); + $endDate = date('t', mktime(0, 0, 0, $period, 1, (int) $currentYear)); $autoFilter->getColumn('D') ->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER) diff --git a/samples/Autofilter/10_Autofilter_selection_2.php b/samples/Autofilter/10_Autofilter_selection_2.php index 28b069ed..1c55a0cf 100644 --- a/samples/Autofilter/10_Autofilter_selection_2.php +++ b/samples/Autofilter/10_Autofilter_selection_2.php @@ -67,7 +67,7 @@ foreach ($years as $year) { $income = null; } elseif ($incomeOrExpenditure == 1) { $expenditure = rand(-500, -1000) * (1 + (rand(-1, 1) / 4)); - $income = rand(500, 1000) * (1 + rand(-0.25, +0.25)); + $income = rand(500, 1000) * (1 + (rand(-1, 1) / 4)); } else { $expenditure = null; $income = rand(500, 1000) * (1 + (rand(-1, 1) / 4)); diff --git a/samples/Autofilter/10_Autofilter_selection_display.php b/samples/Autofilter/10_Autofilter_selection_display.php index faea9b22..55211552 100644 --- a/samples/Autofilter/10_Autofilter_selection_display.php +++ b/samples/Autofilter/10_Autofilter_selection_display.php @@ -127,7 +127,7 @@ $autoFilter->getColumn('C') // Filter the Date column on a filter value of the first day of every period of the current year // We us a dateGroup ruletype for this, although it is still a standard filter foreach ($periods as $period) { - $endDate = date('t', mktime(0, 0, 0, $period, 1, $currentYear)); + $endDate = date('t', mktime(0, 0, 0, $period, 1, (int) $currentYear)); $autoFilter->getColumn('D') ->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER)