There should be a boolean arrayable flag in the pattern (schema), and if it's true, then ToArray trait should be used in the generated class.
Get rid of DtoSerialize trait in the generated class, because it's already used in the ToArray trait.
Implement PhpDto\Arrayable interface that contains just one method public function toArray(): array.
There should be a boolean
arrayableflag in the pattern (schema), and if it's true, thenToArraytrait should be used in the generated class.Get rid of
DtoSerializetrait in the generated class, because it's already used in theToArraytrait.Implement
PhpDto\Arrayableinterface that contains just one methodpublic function toArray(): array.