I am still getting this code generated:
protected function validateAdvertiserIndustry($value, array $modelData)
{
if ($value instanceof UnitEnum && !($value instanceof AdvertiserIndustry)) {
$this->errorRegistry->addError(new \PHPModelGenerator\Exception\Generic\InvalidTypeException($value ?? null, ... [
0 => 'advertiser_industry',
1 => 'AdvertiserIndustry',
]));
}
if (!is_string($value)) {
$this->errorRegistry->addError(new \PHPModelGenerator\Exception\Generic\InvalidTypeException($value ?? null, ... [
0 => 'advertiser_industry',
1 => 'string',
]));
}
so if I hand in valid Enum AdvertiserIndustry, the first check passes. The second check fails because the enum is not a string
I am still getting this code generated:
so if I hand in valid Enum AdvertiserIndustry, the first check passes. The second check fails because the enum is not a string