src/Api/Message.php
private function prepareMultipartParameters(array $params): array
    {
        $postDataMultipart = [];
        foreach ($params as $key => $value) {
            // If $value is not an array we cast it to an array
            foreach ((array) $value as $subValue) {
                $postDataMultipart[] = [
                    'name' => $key,
                    'content' => $subValue,
                ];
            }
        }

        return $postDataMultipart;
    }
private function prepareMultipartParameters(array $params): array
    {
        $postDataMultipart = [];
        foreach ($params as $key => $value) {
            // If $value is not an array we cast it to an array
            foreach ((array) $value as $subValue) {
                $postDataMultipart[] = [
                    'name' => $key,
                    'content' => $subValue,
                ];
            }
        }

        return $postDataMultipart;
    }
private function prepareMultipartParameters ( array $ params ) : array { $ postDataMultipart = [ ] ; foreach ( $ params as $ key => $ value ) { // If $value is not an array we cast it to an array foreach ( ( array ) $ value as $ subValue ) { $ postDataMultipart [ ] = [ 'name' => $ key , 'content' => $ subValue , ] ; } } return $ postDataMultipart ; }
Prepare multipart parameters. Make sure each POST parameter is split into an array with 'name' and 'content' keys.
Prepare multipart parameters . Make sure each POST parameter is split into an array with name and content keys .