Completed
Push — master ( 5c086a...710747 )
by mains
07:28
created
php/Requests/AbstractRequest.php 1 patch
Upper-Lower-Casing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
     const USERAGENT = 'Jodel/4.34.2 Dalvik/2.1.0 (Linux; U; Android 5.1.1; )';
9 9
     const CLIENT_TYPE = 'android_4.34.2';
10 10
     
11
-    private $accessToken = null;
11
+    private $accessToken = NULL;
12 12
     private $payLoad;
13 13
     public $expects = '';
14 14
     public $version = 'v2';
@@ -72,38 +72,38 @@  discard block
 block discarded – undo
72 72
         }
73 73
         switch ($result->status_code) {
74 74
             case 200:
75
-                $result = json_decode($result->body, true);
75
+                $result = json_decode($result->body, TRUE);
76 76
                 break;
77 77
             case 204:
78 78
                 $result = 'Success';
79 79
                 break;
80 80
             case 400:
81
-                $result = json_decode($result->body, true);
82
-                error_log('Error 400 - ' . print_r($result, true));
81
+                $result = json_decode($result->body, TRUE);
82
+                error_log('Error 400 - ' . print_r($result, TRUE));
83 83
                 break;
84 84
             case 401:
85
-                $result = json_decode($result->body, true);
86
-                error_log('Error 401 - ' . print_r($result, true));
85
+                $result = json_decode($result->body, TRUE);
86
+                error_log('Error 401 - ' . print_r($result, TRUE));
87 87
                 break;
88 88
             case 404:
89
-                error_log('Error 404 - ' . print_r($result, true));
90
-                $result = json_decode($result->body, true);
89
+                error_log('Error 404 - ' . print_r($result, TRUE));
90
+                $result = json_decode($result->body, TRUE);
91 91
                 break;
92 92
 			case 477:
93
-                $result = json_decode($result->body, true);
94
-                error_log('Error 477 - ' . print_r($result, true));
93
+                $result = json_decode($result->body, TRUE);
94
+                error_log('Error 477 - ' . print_r($result, TRUE));
95 95
                 break;
96 96
             case 429:
97
-                error_log('Error 429 - Too Many Requests' . print_r(json_decode($result->body, true), true));
97
+                error_log('Error 429 - Too Many Requests' . print_r(json_decode($result->body, TRUE), TRUE));
98 98
             	exit("Error 429: Too Many Requests");
99 99
             	break;
100 100
             case 403:
101
-                error_log('Error 403 - Access denied:' . print_r(json_decode($result->body, true), true));
102
-                $result = json_decode($result->body, true);
101
+                error_log('Error 403 - Access denied:' . print_r(json_decode($result->body, TRUE), TRUE));
102
+                $result = json_decode($result->body, TRUE);
103 103
                 break;
104 104
             case 503:
105
-                error_log('Error 503 - ' . print_r($result, true));
106
-                $result = json_decode($result->body, true);
105
+                error_log('Error 503 - ' . print_r($result, TRUE));
106
+                $result = json_decode($result->body, TRUE);
107 107
 
108 108
                 if(array_key_exists('error', $result) && $result['error'] == 'Service Unavailable"')
109 109
                 {
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                 break;
113 113
             default:
114 114
                 error_log('Error '.$result->status_code.' - Unauthorized');
115
-                $result = json_decode($result->body, true);
115
+                $result = json_decode($result->body, TRUE);
116 116
         }
117 117
 
118 118
         //important for account refresh
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      */
135 135
     private function getSignHeaders()
136 136
     {
137
-			if($this->getAccessToken() == null) {
137
+			if($this->getAccessToken() == NULL) {
138 138
 				$payload_accessToken = "";
139 139
 			}
140 140
 			else {
Please login to merge, or discard this patch.