mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-10-06 20:09:01 +00:00
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:
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user