mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-17 16:51:35 +00:00
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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user