Skip to content

Commit

Permalink
change $trenType to $trendMethod in case TREND_BEST_FIT
Browse files Browse the repository at this point in the history
  • Loading branch information
quonly authored Feb 3, 2025
1 parent e721975 commit e496d85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Shared/Trend/Trend.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static function calculate(string $trendType = self::TREND_BEST_FIT, array
$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);

Check failure on line 99 in src/PhpSpreadsheet/Shared/Trend/Trend.php

View workflow job for this annotation

GitHub Actions / phpstan

No error to ignore is reported on line 99.
$bestFitValue[$trendMethod] = $bestFit[$trendMethod]->getGoodnessOfFit();

Check failure on line 100 in src/PhpSpreadsheet/Shared/Trend/Trend.php

View workflow job for this annotation

GitHub Actions / phpstan

Call to an undefined method object::getGoodnessOfFit().
Expand Down

0 comments on commit e496d85

Please sign in to comment.