mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-19 00:17:05 +00:00
fix(php-nextgen): do not call static methods dynamically (#21163)
This commit is contained in:
@@ -404,7 +404,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, JsonSerializable
|
||||
if (is_null($array_string_enum_default)) {
|
||||
throw new InvalidArgumentException('non-nullable array_string_enum_default cannot be null');
|
||||
}
|
||||
$allowedValues = $this->getArrayStringEnumDefaultAllowableValues();
|
||||
$allowedValues = self::getArrayStringEnumDefaultAllowableValues();
|
||||
if (array_diff($array_string_enum_default, $allowedValues)) {
|
||||
throw new InvalidArgumentException(
|
||||
sprintf(
|
||||
|
||||
@@ -331,7 +331,7 @@ class Pet implements ModelInterface, ArrayAccess, JsonSerializable
|
||||
if ($this->container['photo_urls'] === null) {
|
||||
$invalidProperties[] = "'photo_urls' can't be null";
|
||||
}
|
||||
$allowedValues = $this->getStatusAllowableValues();
|
||||
$allowedValues = self::getStatusAllowableValues();
|
||||
if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value '%s' for 'status', must be one of '%s'",
|
||||
@@ -512,7 +512,7 @@ class Pet implements ModelInterface, ArrayAccess, JsonSerializable
|
||||
if (is_null($status)) {
|
||||
throw new InvalidArgumentException('non-nullable status cannot be null');
|
||||
}
|
||||
$allowedValues = $this->getStatusAllowableValues();
|
||||
$allowedValues = self::getStatusAllowableValues();
|
||||
if (!in_array($status, $allowedValues, true)) {
|
||||
throw new InvalidArgumentException(
|
||||
sprintf(
|
||||
|
||||
@@ -361,7 +361,7 @@ class Query implements ModelInterface, ArrayAccess, JsonSerializable
|
||||
if (is_null($outcomes)) {
|
||||
throw new InvalidArgumentException('non-nullable outcomes cannot be null');
|
||||
}
|
||||
$allowedValues = $this->getOutcomesAllowableValues();
|
||||
$allowedValues = self::getOutcomesAllowableValues();
|
||||
if (array_diff($outcomes, $allowedValues)) {
|
||||
throw new InvalidArgumentException(
|
||||
sprintf(
|
||||
|
||||
Reference in New Issue
Block a user