@@ -5,28 +5,28 @@ |
||
| 5 | 5 | { |
| 6 | 6 | protected $errors = []; |
| 7 | 7 | |
| 8 | - public function __construct($errors = [], $status = 0 ) |
|
| 8 | + public function __construct($errors = [], $status = 0) |
|
| 9 | 9 | { |
| 10 | 10 | $message = ""; |
| 11 | 11 | |
| 12 | 12 | $this->errors = $errors; |
| 13 | 13 | |
| 14 | - if (!empty($errors)){ |
|
| 14 | + if (!empty($errors)) { |
|
| 15 | 15 | $error = array_shift($errors); |
| 16 | 16 | |
| 17 | - if (isset($error->title)){ |
|
| 17 | + if (isset($error->title)) { |
|
| 18 | 18 | $message = $error->title; |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | - if (isset($error->detail)){ |
|
| 21 | + if (isset($error->detail)) { |
|
| 22 | 22 | $message .= (empty($message)) ? $error->detail : ": $error->detail"; |
| 23 | 23 | } |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - if (empty($message)){ |
|
| 26 | + if (empty($message)) { |
|
| 27 | 27 | $message = "API Server Responded with error"; |
| 28 | 28 | |
| 29 | - if ($status){ |
|
| 29 | + if ($status) { |
|
| 30 | 30 | $message .= " $status"; |
| 31 | 31 | } |
| 32 | 32 | } |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | $value) : $value; |
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | - } else{ |
|
| 139 | + } else { |
|
| 140 | 140 | $query['filter'][$resource] = $columns; |
| 141 | 141 | } |
| 142 | 142 | } |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | if (!empty($this->jsonData)) { |
| 171 | 171 | $params['json'] = $this->jsonData; |
| 172 | 172 | } |
| 173 | - else{ |
|
| 173 | + else { |
|
| 174 | 174 | if ($this->multipart) { |
| 175 | 175 | $params['multipart'] = $this->convertFormDataIntoMultipart($this->formData); |
| 176 | 176 | } else { |
@@ -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 { |