forked from loafle/openapi-generator-original
[PHP] - Removes trailing comma from ::flattenArray() (#20988)
* [PHP] - Removes trailing comma from ::flattenArray() * Removes "mixed" type * Missed one mixed
This commit is contained in:
parent
5e5832d982
commit
c6e2a5fa94
@ -324,7 +324,7 @@ class ObjectSerializer
|
|||||||
*
|
*
|
||||||
* @return array [key => value] of formdata
|
* @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) {
|
if ($value instanceof \SplFileObject) {
|
||||||
return [$key => $value->getRealPath()];
|
return [$key => $value->getRealPath()];
|
||||||
@ -628,9 +628,9 @@ class ObjectSerializer
|
|||||||
* credit: https://github.com/FranBar1966/FlatPHP
|
* credit: https://github.com/FranBar1966/FlatPHP
|
||||||
*/
|
*/
|
||||||
private static function flattenArray(
|
private static function flattenArray(
|
||||||
mixed $source,
|
$source,
|
||||||
array &$destination,
|
array &$destination,
|
||||||
string $start = '',
|
string $start = ''
|
||||||
) {
|
) {
|
||||||
$opt = [
|
$opt = [
|
||||||
'prefix' => '[',
|
'prefix' => '[',
|
||||||
|
@ -333,7 +333,7 @@ class ObjectSerializer
|
|||||||
*
|
*
|
||||||
* @return array [key => value] of formdata
|
* @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) {
|
if ($value instanceof \SplFileObject) {
|
||||||
return [$key => $value->getRealPath()];
|
return [$key => $value->getRealPath()];
|
||||||
@ -637,9 +637,9 @@ class ObjectSerializer
|
|||||||
* credit: https://github.com/FranBar1966/FlatPHP
|
* credit: https://github.com/FranBar1966/FlatPHP
|
||||||
*/
|
*/
|
||||||
private static function flattenArray(
|
private static function flattenArray(
|
||||||
mixed $source,
|
$source,
|
||||||
array &$destination,
|
array &$destination,
|
||||||
string $start = '',
|
string $start = ''
|
||||||
) {
|
) {
|
||||||
$opt = [
|
$opt = [
|
||||||
'prefix' => '[',
|
'prefix' => '[',
|
||||||
|
@ -333,7 +333,7 @@ class ObjectSerializer
|
|||||||
*
|
*
|
||||||
* @return array [key => value] of formdata
|
* @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) {
|
if ($value instanceof \SplFileObject) {
|
||||||
return [$key => $value->getRealPath()];
|
return [$key => $value->getRealPath()];
|
||||||
@ -637,9 +637,9 @@ class ObjectSerializer
|
|||||||
* credit: https://github.com/FranBar1966/FlatPHP
|
* credit: https://github.com/FranBar1966/FlatPHP
|
||||||
*/
|
*/
|
||||||
private static function flattenArray(
|
private static function flattenArray(
|
||||||
mixed $source,
|
$source,
|
||||||
array &$destination,
|
array &$destination,
|
||||||
string $start = '',
|
string $start = ''
|
||||||
) {
|
) {
|
||||||
$opt = [
|
$opt = [
|
||||||
'prefix' => '[',
|
'prefix' => '[',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user