1 | <?php |
||
2 | |||
3 | namespace bSecure\Exception; |
||
4 | |||
5 | /** |
||
6 | * InvalidRequestException is thrown when a request is initiated with invalid |
||
7 | * parameters. |
||
8 | */ |
||
9 | class InvalidRequestException extends ApiErrorException |
||
10 | { |
||
11 | /** |
||
12 | * Creates a new InvalidRequestException exception. |
||
13 | * |
||
14 | * @param string $message the exception message |
||
15 | * @param null|int $httpStatus the HTTP status code |
||
16 | * @param null|string $httpBody the HTTP body as a string |
||
17 | * @param null|array $jsonBody the JSON deserialized body |
||
18 | * @param null|array|\bSecure\Util\CaseInsensitiveArray $httpHeaders the HTTP headers array |
||
19 | * @param null|string $code the bSecure error code |
||
20 | * |
||
21 | * @return InvalidRequestException |
||
22 | */ |
||
23 | public static function factory( |
||
24 | $message, |
||
25 | $httpStatus = null, |
||
26 | $httpBody = null, |
||
27 | $jsonBody = null, |
||
28 | $httpHeaders = null, |
||
29 | $Code = null |
||
30 | ) { |
||
31 | var_dump($message, $httpStatus, $httpBody, $jsonBody, $httpHeaders); |
||
0 ignored issues
–
show
Security
Debugging Code
introduced
by
![]() |
|||
32 | $message = is_array($message) ? implode (", ", $message) : $message; |
||
0 ignored issues
–
show
|
|||
33 | $instance = parent::factory($message, $httpStatus, $httpBody, $jsonBody, $httpHeaders,$Code); |
||
34 | return $instance; |
||
35 | } |
||
36 | } |