fix(php-nextgen): do not call static methods dynamically (#21163)

This commit is contained in:
Simon Podlipsky
2025-04-29 10:29:52 +03:00
committed by GitHub
parent daeffde719
commit 2327562af4
13 changed files with 28 additions and 28 deletions

View File

@@ -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(

View File

@@ -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(

View File

@@ -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(