@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $header = $this->getSignHeaders(); |
| 29 | 29 | $url = $this->getFullUrl(); |
| 30 | 30 | |
| 31 | - if ($this->getAccessToken()) { |
|
| 31 | + if($this->getAccessToken()) { |
|
| 32 | 32 | $header['Authorization'] = "Bearer " . $this->getAccessToken(); |
| 33 | 33 | } |
| 34 | 34 | //Comment out to debug the Request: |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | 'proxy' => '186.103.169.165:8080', |
| 51 | 51 | );*/ |
| 52 | 52 | |
| 53 | - switch ($this->getMethod()) { |
|
| 53 | + switch($this->getMethod()) { |
|
| 54 | 54 | case 'POST': |
| 55 | 55 | $result = Requests::post($url, $header, $this->payLoad); |
| 56 | 56 | break; |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $result = Requests::put($url, $header, $this->payLoad); |
| 69 | 69 | break; |
| 70 | 70 | } |
| 71 | - switch ($result->status_code) { |
|
| 71 | + switch($result->status_code) { |
|
| 72 | 72 | case 200: |
| 73 | 73 | $result = json_decode($result->body, true); |
| 74 | 74 | break; |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | exit("Error 403: Access denied"); |
| 97 | 97 | break; |
| 98 | 98 | default: |
| 99 | - error_log('Error '.$result->status_code.' - Unauthorized'); // - JodelDeviceId:' . $deviceUid); |
|
| 99 | + error_log('Error ' . $result->status_code . ' - Unauthorized'); // - JodelDeviceId:' . $deviceUid); |
|
| 100 | 100 | //throw new \Exception('Unknown Error: '.$result->status_code); |
| 101 | 101 | } |
| 102 | 102 | |