Skip to content

Commit e496d85

Browse files
authored
change $trenType to $trendMethod in case TREND_BEST_FIT
1 parent e721975 commit e496d85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpSpreadsheet/Shared/Trend/Trend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public static function calculate(string $trendType = self::TREND_BEST_FIT, array
9494
$bestFit = [];
9595
$bestFitValue = [];
9696
foreach (self::$trendTypes as $trendMethod) {
97-
$className = '\PhpOffice\PhpSpreadsheet\Shared\Trend\\' . $trendType . 'BestFit';
97+
$className = '\PhpOffice\PhpSpreadsheet\Shared\Trend\\' . $trendMethod . 'BestFit';
9898
//* @phpstan-ignore-next-line
9999
$bestFit[$trendMethod] = new $className($yValues, $xValues, $const);
100100
$bestFitValue[$trendMethod] = $bestFit[$trendMethod]->getGoodnessOfFit();

0 commit comments

Comments
 (0)