Files
PhpSpreadsheet/tests/data/Cell/SetValueExplicitException.php
T
oleibman 85c1512b67 Better Definitions for Mixed Parameters and Values Part 3 of Many
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.
2024-06-04 06:47:51 -07:00

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],
];