change $trenType to $trendMethod in case TREND_BEST_FIT

This commit is contained in:
Amornthep
2025-02-03 14:13:40 +07:00
committed by GitHub
parent e721975cb6
commit e496d856c0
+1 -1
View File
@@ -94,7 +94,7 @@ class Trend
$bestFit = [];
$bestFitValue = [];
foreach (self::$trendTypes as $trendMethod) {
$className = '\PhpOffice\PhpSpreadsheet\Shared\Trend\\' . $trendType . 'BestFit';
$className = '\PhpOffice\PhpSpreadsheet\Shared\Trend\\' . $trendMethod . 'BestFit';
//* @phpstan-ignore-next-line
$bestFit[$trendMethod] = new $className($yValues, $xValues, $const);
$bestFitValue[$trendMethod] = $bestFit[$trendMethod]->getGoodnessOfFit();