Completed
Push — master ( 7090ac...6b3ac5 )
by mains
02:39
created
php/Requests/AbstractRequest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
                 }
66 66
                 break;
67 67
             case 'PUT':
68
-                $result = Requests::put($url, $header);//, $this->payLoad);
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.