From c6e2a5fa94f03360af29c493025f3af7f954658f Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Sat, 29 Mar 2025 12:08:52 -0500 Subject: [PATCH] [PHP] - Removes trailing comma from ::flattenArray() (#20988) * [PHP] - Removes trailing comma from ::flattenArray() * Removes "mixed" type * Missed one mixed --- .../src/main/resources/php/ObjectSerializer.mustache | 6 +++--- .../petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php | 6 +++--- samples/client/petstore/php/psr-18/lib/ObjectSerializer.php | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache index c650ac86df5..b076414630c 100644 --- a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache +++ b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache @@ -324,7 +324,7 @@ class ObjectSerializer * * @return array [key => value] of formdata */ - public static function toFormValue(string $key, mixed $value) + public static function toFormValue(string $key, $value) { if ($value instanceof \SplFileObject) { return [$key => $value->getRealPath()]; @@ -628,9 +628,9 @@ class ObjectSerializer * credit: https://github.com/FranBar1966/FlatPHP */ private static function flattenArray( - mixed $source, + $source, array &$destination, - string $start = '', + string $start = '' ) { $opt = [ 'prefix' => '[', diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index d6d1fa941d6..a144eb7641b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -333,7 +333,7 @@ class ObjectSerializer * * @return array [key => value] of formdata */ - public static function toFormValue(string $key, mixed $value) + public static function toFormValue(string $key, $value) { if ($value instanceof \SplFileObject) { return [$key => $value->getRealPath()]; @@ -637,9 +637,9 @@ class ObjectSerializer * credit: https://github.com/FranBar1966/FlatPHP */ private static function flattenArray( - mixed $source, + $source, array &$destination, - string $start = '', + string $start = '' ) { $opt = [ 'prefix' => '[', diff --git a/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php b/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php index d6d1fa941d6..a144eb7641b 100644 --- a/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php @@ -333,7 +333,7 @@ class ObjectSerializer * * @return array [key => value] of formdata */ - public static function toFormValue(string $key, mixed $value) + public static function toFormValue(string $key, $value) { if ($value instanceof \SplFileObject) { return [$key => $value->getRealPath()]; @@ -637,9 +637,9 @@ class ObjectSerializer * credit: https://github.com/FranBar1966/FlatPHP */ private static function flattenArray( - mixed $source, + $source, array &$destination, - string $start = '', + string $start = '' ) { $opt = [ 'prefix' => '[',