Skip to content

Commit c6e2a5f

Browse files
authored
[PHP] - Removes trailing comma from ::flattenArray() (#20988)
* [PHP] - Removes trailing comma from ::flattenArray() * Removes "mixed" type * Missed one mixed
1 parent 5e5832d commit c6e2a5f

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ class ObjectSerializer
324324
*
325325
* @return array [key => value] of formdata
326326
*/
327-
public static function toFormValue(string $key, mixed $value)
327+
public static function toFormValue(string $key, $value)
328328
{
329329
if ($value instanceof \SplFileObject) {
330330
return [$key => $value->getRealPath()];
@@ -628,9 +628,9 @@ class ObjectSerializer
628628
* credit: https://github.com/FranBar1966/FlatPHP
629629
*/
630630
private static function flattenArray(
631-
mixed $source,
631+
$source,
632632
array &$destination,
633-
string $start = '',
633+
string $start = ''
634634
) {
635635
$opt = [
636636
'prefix' => '[',

samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ public static function toHeaderValue($value)
333333
*
334334
* @return array [key => value] of formdata
335335
*/
336-
public static function toFormValue(string $key, mixed $value)
336+
public static function toFormValue(string $key, $value)
337337
{
338338
if ($value instanceof \SplFileObject) {
339339
return [$key => $value->getRealPath()];
@@ -637,9 +637,9 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986):
637637
* credit: https://github.com/FranBar1966/FlatPHP
638638
*/
639639
private static function flattenArray(
640-
mixed $source,
640+
$source,
641641
array &$destination,
642-
string $start = '',
642+
string $start = ''
643643
) {
644644
$opt = [
645645
'prefix' => '[',

samples/client/petstore/php/psr-18/lib/ObjectSerializer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ public static function toHeaderValue($value)
333333
*
334334
* @return array [key => value] of formdata
335335
*/
336-
public static function toFormValue(string $key, mixed $value)
336+
public static function toFormValue(string $key, $value)
337337
{
338338
if ($value instanceof \SplFileObject) {
339339
return [$key => $value->getRealPath()];
@@ -637,9 +637,9 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986):
637637
* credit: https://github.com/FranBar1966/FlatPHP
638638
*/
639639
private static function flattenArray(
640-
mixed $source,
640+
$source,
641641
array &$destination,
642-
string $start = '',
642+
string $start = ''
643643
) {
644644
$opt = [
645645
'prefix' => '[',

0 commit comments

Comments
 (0)