@@ -157,6 +157,9 @@ discard block |
||
| 157 | 157 | return $this; |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | + /** |
|
| 161 | + * @param integer $code |
|
| 162 | + */ |
|
| 160 | 163 | public function assertResponseCode($code) |
| 161 | 164 | { |
| 162 | 165 | $this->statusExpected = $code; |
@@ -266,6 +269,10 @@ discard block |
||
| 266 | 269 | return $response; |
| 267 | 270 | } |
| 268 | 271 | |
| 272 | + /** |
|
| 273 | + * @param string $contentType |
|
| 274 | + * @param string $body |
|
| 275 | + */ |
|
| 269 | 276 | protected function parseMultiPartForm($contentType, $body) |
| 270 | 277 | { |
| 271 | 278 | $matchRequest = []; |
@@ -285,8 +285,9 @@ |
||
| 285 | 285 | |
| 286 | 286 | // loop data blocks |
| 287 | 287 | foreach ($blocks as $id => $block) { |
| 288 | - if (empty($block)) |
|
| 289 | - continue; |
|
| 288 | + if (empty($block)) { |
|
| 289 | + continue; |
|
| 290 | + } |
|
| 290 | 291 | |
| 291 | 292 | if (strpos($block, 'application/octet-stream') !== false) { |
| 292 | 293 | preg_match("/name=\"([^\"]*)\".*stream[\n|\r]+([^\n\r].*)?$/s", $block, $matches); |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | * @param array|null $query |
| 62 | 62 | * @param array|null $requestBody |
| 63 | 63 | * @param array $requestHeader |
| 64 | - * @return mixed |
|
| 64 | + * @return \Psr\Http\Message\ResponseInterface |
|
| 65 | 65 | * @throws DefinitionNotFoundException |
| 66 | 66 | * @throws GenericSwaggerException |
| 67 | 67 | * @throws HttpMethodNotFoundException |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | * @param array $schemaArray |
| 89 | 89 | * @param string $body |
| 90 | 90 | * @param string $type |
| 91 | - * @return bool |
|
| 91 | + * @return null|boolean |
|
| 92 | 92 | * @throws NotMatchedException |
| 93 | 93 | */ |
| 94 | 94 | protected function matchString($name, $schemaArray, $body, $type) |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | * @param array $schemaArray |
| 110 | 110 | * @param string $body |
| 111 | 111 | * @param string $type |
| 112 | - * @return bool |
|
| 112 | + * @return null|boolean |
|
| 113 | 113 | */ |
| 114 | 114 | protected function matchFile($name, $schemaArray, $body, $type) |
| 115 | 115 | { |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * @param string $name |
| 125 | 125 | * @param string $body |
| 126 | 126 | * @param string $type |
| 127 | - * @return bool |
|
| 127 | + * @return null|boolean |
|
| 128 | 128 | * @throws NotMatchedException |
| 129 | 129 | */ |
| 130 | 130 | protected function matchNumber($name, $body, $type) |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | * @param string $name |
| 145 | 145 | * @param string $body |
| 146 | 146 | * @param string $type |
| 147 | - * @return bool |
|
| 147 | + * @return null|boolean |
|
| 148 | 148 | * @throws NotMatchedException |
| 149 | 149 | */ |
| 150 | 150 | protected function matchBool($name, $body, $type) |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | * @param array $schemaArray |
| 166 | 166 | * @param string $body |
| 167 | 167 | * @param string $type |
| 168 | - * @return bool |
|
| 168 | + * @return null|boolean |
|
| 169 | 169 | * @throws DefinitionNotFoundException |
| 170 | 170 | * @throws GenericSwaggerException |
| 171 | 171 | * @throws InvalidDefinitionException |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | * @param string $body |
| 362 | 362 | * @param string $type |
| 363 | 363 | * @param bool $nullable |
| 364 | - * @return bool |
|
| 364 | + * @return null|boolean |
|
| 365 | 365 | * @throws NotMatchedException |
| 366 | 366 | */ |
| 367 | 367 | protected function matchNull($name, $body, $type, $nullable) |