Phpstan and Samples

Phpstan hasn't identified any errors in Samples in a long time. But, as it turns out, one particular error is suppressed:
```
Variable $helper might not be defined.
```
This error would be generated by almost all samples, and the errors that it suppresses will become problematic if we move to Level 10. We are not yet committed to doing that, but it is pretty easy to write a script to change the samples so that error no longer happens, and there isn't really any reason to delay doing so. The results of that script constitute this PR.
This commit is contained in:
oleibman
2025-04-05 13:54:20 -07:00
parent d51bf5f65a
commit ecbd702628
299 changed files with 300 additions and 221 deletions
+1
View File
@@ -8,6 +8,7 @@ use PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx as XlsxWriter;
require __DIR__ . '/../Header.php';
/** @var PhpOffice\PhpSpreadsheet\Helper\Sample $helper */
// Read from Xls (.xls) template
$helper->log('Load Xlsx template file');