forked from loafle/openapi-generator-original
fix invalid function is_subclass call for php-nextgen (#16712)
This commit is contained in:
@@ -83,7 +83,7 @@ class ObjectSerializer
|
||||
$getter = $data::getters()[$property];
|
||||
$value = $data->$getter();
|
||||
if ($value !== null && !in_array($openAPIType, [{{&primitives}}], true)) {
|
||||
if (is_sublass_of($openAPIType, '\BackedEnum')) {
|
||||
if (is_subclass_of($openAPIType, '\BackedEnum')) {
|
||||
$data = $openAPIType::tryFrom($data);
|
||||
if ($data === null) {
|
||||
$imploded = implode("', '", array_map(fn($case) => $case->value, $openAPIType::cases()));
|
||||
|
||||
Reference in New Issue
Block a user