@@ -169,8 +169,7 @@ |
||
| 169 | 169 | |
| 170 | 170 | if (!empty($this->jsonData)) { |
| 171 | 171 | $params['json'] = $this->jsonData; |
| 172 | - } |
|
| 173 | - else { |
|
| 172 | + } else { |
|
| 174 | 173 | if ($this->multipart) { |
| 175 | 174 | $params['multipart'] = $this->convertFormDataIntoMultipart($this->formData); |
| 176 | 175 | } else { |
@@ -5,39 +5,39 @@ |
||
| 5 | 5 | { |
| 6 | 6 | protected $errors = []; |
| 7 | 7 | |
| 8 | - public function __construct($errors = [], $status = 0) |
|
| 9 | - { |
|
| 10 | - $message = ""; |
|
| 8 | + public function __construct($errors = [], $status = 0) |
|
| 9 | + { |
|
| 10 | + $message = ""; |
|
| 11 | 11 | |
| 12 | - $this->errors = $errors; |
|
| 12 | + $this->errors = $errors; |
|
| 13 | 13 | |
| 14 | - if (!empty($errors)) { |
|
| 15 | - $error = array_shift($errors); |
|
| 14 | + if (!empty($errors)) { |
|
| 15 | + $error = array_shift($errors); |
|
| 16 | 16 | |
| 17 | - if (isset($error->title)) { |
|
| 18 | - $message = $error->title; |
|
| 19 | - } |
|
| 17 | + if (isset($error->title)) { |
|
| 18 | + $message = $error->title; |
|
| 19 | + } |
|
| 20 | 20 | |
| 21 | - if (isset($error->detail)) { |
|
| 22 | - $message .= (empty($message)) ? $error->detail : ": $error->detail"; |
|
| 23 | - } |
|
| 24 | - } |
|
| 21 | + if (isset($error->detail)) { |
|
| 22 | + $message .= (empty($message)) ? $error->detail : ": $error->detail"; |
|
| 23 | + } |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | - if (empty($message)) { |
|
| 27 | - $message = "API Server Responded with error"; |
|
| 26 | + if (empty($message)) { |
|
| 27 | + $message = "API Server Responded with error"; |
|
| 28 | 28 | |
| 29 | - if ($status) { |
|
| 30 | - $message .= " $status"; |
|
| 31 | - } |
|
| 32 | - } |
|
| 29 | + if ($status) { |
|
| 30 | + $message .= " $status"; |
|
| 31 | + } |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | - // make sure everything is assigned properly |
|
| 34 | + // make sure everything is assigned properly |
|
| 35 | 35 | parent::__construct($message, $status); |
| 36 | - } |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | - public function getErrors() |
|
| 39 | - { |
|
| 40 | - return $this->errors; |
|
| 41 | - } |
|
| 38 | + public function getErrors() |
|
| 39 | + { |
|
| 40 | + return $this->errors; |
|
| 41 | + } |
|
| 42 | 42 | |
| 43 | 43 | } |