mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-27 10:30:02 +00:00
85c1512b67
Continuing work started with PR #4016 and PR #4026. Improve documentation within program by making explicit what types of values are allowed for variables described as "mixed". In order to avoid broken functionality, this is done mainly through doc-blocks. This will get us closer to Phpstan Level 9, but many changes will be needed before we can consider that. This change has more executable code changes than its predecessor. I will wait longer than normal before merging it to allow for additional testing.
12 lines
278 B
PHP
12 lines
278 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use PhpOffice\PhpSpreadsheet\Cell\DataType;
|
|
|
|
return [
|
|
'invalid numeric' => ['XYZ', DataType::TYPE_NUMERIC],
|
|
'invalid array' => [[], DataType::TYPE_STRING],
|
|
'invalid unstringable object' => [new DateTime(), DataType::TYPE_INLINE],
|
|
];
|