We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b00fac commit 14e9806Copy full SHA for 14e9806
src/PhpSpreadsheet/Shared/Date.php
@@ -192,7 +192,7 @@ public static function excelToDateTimeObject($excelTimestamp, $timeZone = null)
192
$interval = $days . ' days';
193
194
return $baseDate->modify($interval)
195
- ->setTime($hours, $minutes, $seconds);
+ ->setTime((int) $hours, (int) $minutes, (int) $seconds);
196
}
197
198
/**
@@ -244,12 +244,12 @@ public static function PHPToExcel($dateValue)
244
public static function dateTimeToExcel(DateTimeInterface $dateValue)
245
{
246
return self::formattedPHPToExcel(
247
- $dateValue->format('Y'),
248
- $dateValue->format('m'),
249
- $dateValue->format('d'),
250
- $dateValue->format('H'),
251
- $dateValue->format('i'),
252
- $dateValue->format('s')
+ (int) $dateValue->format('Y'),
+ (int) $dateValue->format('m'),
+ (int) $dateValue->format('d'),
+ (int) $dateValue->format('H'),
+ (int) $dateValue->format('i'),
+ (int) $dateValue->format('s')
253
);
254
255
src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php
@@ -113,7 +113,9 @@ private function exponentialRegression($yValues, $xValues, $const)
113
*/
114
public function __construct($yValues, $xValues = [], $const = true)
115
116
- if (parent::__construct($yValues, $xValues) !== false) {
+ parent::__construct($yValues, $xValues);
117
+
118
+ if (!$this->error) {
119
$this->exponentialRegression($yValues, $xValues, $const);
120
121
src/PhpSpreadsheet/Shared/Trend/LinearBestFit.php
@@ -72,7 +72,9 @@ private function linearRegression($yValues, $xValues, $const)
72
73
74
75
76
77
78
$this->linearRegression($yValues, $xValues, $const);
79
80
src/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php
@@ -81,7 +81,9 @@ private function logarithmicRegression($yValues, $xValues, $const)
81
82
83
84
85
86
87
$this->logarithmicRegression($yValues, $xValues, $const);
88
89
src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php
@@ -182,7 +182,9 @@ private function polynomialRegression($order, $yValues, $xValues)
182
183
public function __construct($order, $yValues, $xValues = [], $const = true)
184
185
186
187
188
if ($order < $this->valueCount) {
189
$this->bestFitType .= '_' . $order;
190
$this->order = $order;
src/PhpSpreadsheet/Shared/Trend/PowerBestFit.php
@@ -105,7 +105,9 @@ private function powerRegression($yValues, $xValues, $const)
105
106
107
108
109
110
111
$this->powerRegression($yValues, $xValues, $const);
112
0 commit comments