@@ -63,7 +63,7 @@ public function configure()
6363 * @param array<string,string> $requestHeaders
6464 * @return ResponseInterface
6565 */
66- protected function getAsResponse ($ path , array $ parameters = array (), $ requestHeaders = array ())
66+ protected function getAsResponse ($ path , array $ parameters = array (), array $ requestHeaders = array ())
6767 {
6868 $ path = $ this ->preparePath ($ path , $ parameters );
6969
@@ -76,7 +76,7 @@ protected function getAsResponse($path, array $parameters = array(), $requestHea
7676 * @param array<string,string> $requestHeaders
7777 * @return mixed
7878 */
79- protected function get ($ path , array $ parameters = array (), $ requestHeaders = array ())
79+ protected function get ($ path , array $ parameters = array (), array $ requestHeaders = array ())
8080 {
8181 return ResponseMediator::getContent ($ this ->getAsResponse ($ path , $ parameters , $ requestHeaders ));
8282 }
@@ -88,15 +88,15 @@ protected function get($path, array $parameters = array(), $requestHeaders = arr
8888 * @param array<string,string> $files
8989 * @return mixed
9090 */
91- protected function post ($ path , array $ parameters = array (), $ requestHeaders = array (), array $ files = array ())
91+ protected function post ($ path , array $ parameters = array (), array $ requestHeaders = array (), array $ files = array ())
9292 {
9393 $ path = $ this ->preparePath ($ path );
9494
9595 $ body = null ;
96- if (empty ($ files ) && ! empty ($ parameters )) {
96+ if (0 === count ($ files ) && 0 < count ($ parameters )) {
9797 $ body = $ this ->prepareBody ($ parameters );
9898 $ requestHeaders ['Content-Type ' ] = 'application/x-www-form-urlencoded ' ;
99- } elseif (! empty ($ files )) {
99+ } elseif (0 < count ($ files )) {
100100 $ builder = new MultipartStreamBuilder ($ this ->streamFactory );
101101
102102 foreach ($ parameters as $ name => $ value ) {
@@ -128,15 +128,15 @@ protected function post($path, array $parameters = array(), $requestHeaders = ar
128128 * @param array<string,string> $files
129129 * @return mixed
130130 */
131- protected function put ($ path , array $ parameters = array (), $ requestHeaders = array (), array $ files = array ())
131+ protected function put ($ path , array $ parameters = array (), array $ requestHeaders = array (), array $ files = array ())
132132 {
133133 $ path = $ this ->preparePath ($ path );
134134
135135 $ body = null ;
136- if (empty ($ files ) && ! empty ($ parameters )) {
136+ if (0 === count ($ files ) && 0 < count ($ parameters )) {
137137 $ body = $ this ->prepareBody ($ parameters );
138138 $ requestHeaders ['Content-Type ' ] = 'application/x-www-form-urlencoded ' ;
139- } elseif (! empty ($ files )) {
139+ } elseif (0 < count ($ files )) {
140140 $ builder = new MultipartStreamBuilder ($ this ->streamFactory );
141141
142142 foreach ($ parameters as $ name => $ value ) {
@@ -167,7 +167,7 @@ protected function put($path, array $parameters = array(), $requestHeaders = arr
167167 * @param array<string,string> $requestHeaders
168168 * @return mixed
169169 */
170- protected function delete ($ path , array $ parameters = array (), $ requestHeaders = array ())
170+ protected function delete ($ path , array $ parameters = array (), array $ requestHeaders = array ())
171171 {
172172 $ path = $ this ->preparePath ($ path , $ parameters );
173173
0 commit comments