@@ -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: |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | 'proxy' => '186.103.169.165:8080', |
46 | 46 | );*/ |
47 | 47 | |
48 | - switch ($this->getMethod()) { |
|
48 | + switch($this->getMethod()) { |
|
49 | 49 | case 'POST': |
50 | 50 | $result = Requests::post($url, $header, $this->payLoad); |
51 | 51 | break; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $result = Requests::put($url, $header, $this->payLoad); |
64 | 64 | break; |
65 | 65 | } |
66 | - switch ($result->status_code) { |
|
66 | + switch($result->status_code) { |
|
67 | 67 | case 200: |
68 | 68 | $result = json_decode($result->body, true); |
69 | 69 | break; |
@@ -91,8 +91,8 @@ discard block |
||
91 | 91 | exit("Error 403: Access denied"); |
92 | 92 | break; |
93 | 93 | default: |
94 | - error_log('Error '.$result->status_code.' - Unauthorized - JodelDeviceId:' . $deviceUid); |
|
95 | - throw new \Exception('Unknown Error: '.$result->status_code); |
|
94 | + error_log('Error ' . $result->status_code . ' - Unauthorized - JodelDeviceId:' . $deviceUid); |
|
95 | + throw new \Exception('Unknown Error: ' . $result->status_code); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | if($device_uid != "") |