Closed SpraxDev closed 2 months ago
I wouldn't mind creating a PR for that if allowing null
is the correct thing to do.
I'm planning to do some PRs anyway already – I just wasn't sure if such a PR would be accepted or whether another solution would be preferred.
Describe the bug and add attachments
Some values like vMerge and vAlign are type-hinted as
string
(not nullable) although they are initialized asnull
until explicitly set/parsed.That means, there is no proper way to unset some values where it would make sense to 'remove' that attribute. The parameter for
setVMerge
andsetVAlign
for example even has a default value ofnull
set, which is not valid according to its type-hint and makes everything even more confusing.Expected behavior
I think it would make sense to allow
null
to be set for some attributes and everything to be type-hinted accordingly.Steps to reproduce
PHPWord version(s) where the bug happened
master
PHP version(s) where the bug happened
8.3 and all the others
Priority