From a960e77cc7a6db4e7a2154f68a50ff70c5ba25fc Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Fri, 28 Mar 2025 11:28:28 -0500 Subject: [PATCH 1/3] [PHP] - Removes trailing comma from ::flattenArray() --- .../src/main/resources/php/ObjectSerializer.mustache | 2 +- .../petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php | 2 +- samples/client/petstore/php/psr-18/lib/ObjectSerializer.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache index e25b25ce28d7..91c7857d2048 100644 --- a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache +++ b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache @@ -630,7 +630,7 @@ class ObjectSerializer private static function flattenArray( mixed $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 3e1cbe8778bc..6fac3689b708 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -639,7 +639,7 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): private static function flattenArray( mixed $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 3e1cbe8778bc..6fac3689b708 100644 --- a/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php @@ -639,7 +639,7 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): private static function flattenArray( mixed $source, array &$destination, - string $start = '', + string $start = '' ) { $opt = [ 'prefix' => '[', From 9a3327b1d1be0857d603f88fd510e9aa1fb58783 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Fri, 28 Mar 2025 11:52:49 -0500 Subject: [PATCH 2/3] Removes "mixed" type --- .../src/main/resources/php/ObjectSerializer.mustache | 2 +- .../petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php | 2 +- samples/client/petstore/php/psr-18/lib/ObjectSerializer.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache index 91c7857d2048..5927b1504471 100644 --- a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache +++ b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache @@ -628,7 +628,7 @@ class ObjectSerializer * credit: https://github.com/FranBar1966/FlatPHP */ private static function flattenArray( - mixed $source, + $source, array &$destination, string $start = '' ) { diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index 6fac3689b708..fc59ccc10def 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -637,7 +637,7 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): * credit: https://github.com/FranBar1966/FlatPHP */ private static function flattenArray( - mixed $source, + $source, array &$destination, string $start = '' ) { diff --git a/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php b/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php index 6fac3689b708..fc59ccc10def 100644 --- a/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php @@ -637,7 +637,7 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): * credit: https://github.com/FranBar1966/FlatPHP */ private static function flattenArray( - mixed $source, + $source, array &$destination, string $start = '' ) { From 6a896be18e550360d713d4b7bf6e3e87627d300d Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Fri, 28 Mar 2025 11:54:37 -0500 Subject: [PATCH 3/3] Missed one mixed --- .../src/main/resources/php/ObjectSerializer.mustache | 2 +- .../petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php | 2 +- samples/client/petstore/php/psr-18/lib/ObjectSerializer.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache index 5927b1504471..0d5180e6f7c6 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()]; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index fc59ccc10def..767cee848b1c 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 @@ public static function toHeaderValue($value) * * @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()]; diff --git a/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php b/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php index fc59ccc10def..767cee848b1c 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 @@ public static function toHeaderValue($value) * * @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()];