Eliminate Some "Mixed" Variables in Samples

A continuation of PR #3859. Change code that would be flagged if we were to run Phpstan at level 9 (we currently run level 8). I may or may not follow up with source code (454 level-9 problems remain for src), but there is no reason to avoid the effort for samples.

No changes are made to src.
This commit is contained in:
oleibman
2024-01-20 16:39:23 -08:00
parent ae72efe43a
commit 641f86dc80
87 changed files with 654 additions and 507 deletions
@@ -53,11 +53,17 @@ $worksheet
->setCellValue("B{$row}", '=SUM(COLUMN_DATA_VALUES)')
->setCellValue("C{$row}", '=SUM(COLUMN_DATA_VALUES)');
/** @var float */
$calc1 = $worksheet->getCell("B{$row}")->getCalculatedValue();
/** @var float */
$value = $worksheet->getCell('B1')->getValue();
/** @var float */
$calc2 = $worksheet->getCell("C{$row}")->getCalculatedValue();
$helper->log(sprintf(
'Worked %.2f hours at a rate of %.2f - Charge to the client is %.2f',
$worksheet->getCell("B{$row}")->getCalculatedValue(),
$worksheet->getCell('B1')->getValue(),
$worksheet->getCell("C{$row}")->getCalculatedValue()
$calc1,
$value,
$calc2
));
$helper->write($spreadsheet, __FILE__, ['Xlsx']);