if ($mutator->
hasErrors()) { throw new NoSuchPropertyException(implode('. ',
$mutator->
getErrors()).'.'
);
} throw new NoSuchPropertyException(sprintf('Could not determine access type for property "%s" in class "%s".',
$property,
get_debug_type($object)));
} } catch (\TypeError
$e) { if ($recursive || !
$value instanceof \DateTimeInterface || !\
in_array($value::
class,
['DateTime', 'DateTimeImmutable'
], true
) || __FILE__
!== ($e->
getTrace()[0
]['file'
] ?? null
)) { throw $e;
} $value =
$value instanceof \DateTimeImmutable ? \DateTime::
createFromImmutable($value) : \DateTimeImmutable::
createFromMutable($value);
try { $this->
writeProperty($zval,
$property,
$value, true
);
} catch (\TypeError
) { throw $e; // throw the previous error
} } } /**
* Adjusts a collection-valued property by calling add*() and remove*() methods.
*/