Completed
Push — master ( 3c0e9a...ccb03a )
by mains
02:54
created
php/Requests/AbstractRequest.php 1 patch
Upper-Lower-Casing   +19 added lines, -19 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,42 +72,42 @@  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 502:
105
-                error_log('Error 502 - ' . print_r($result, true));
106
-                $result = json_decode($result->body, true);
105
+                error_log('Error 502 - ' . print_r($result, TRUE));
106
+                $result = json_decode($result->body, TRUE);
107 107
                 break;
108 108
             case 503:
109
-                error_log('Error 503 - ' . print_r($result, true));
110
-                $result = json_decode($result->body, true);
109
+                error_log('Error 503 - ' . print_r($result, TRUE));
110
+                $result = json_decode($result->body, TRUE);
111 111
 
112 112
                 if(array_key_exists('error', $result) && $result['error'] == 'Service Unavailable"')
113 113
                 {
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                 break;
117 117
             default:
118 118
                 error_log('Error '.$result->status_code.' - unknown error');
119
-                $result = json_decode($result->body, true);
119
+                $result = json_decode($result->body, TRUE);
120 120
         }
121 121
 
122 122
         //important for account refresh
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      */
139 139
     private function getSignHeaders()
140 140
     {
141
-			if($this->getAccessToken() == null) {
141
+			if($this->getAccessToken() == NULL) {
142 142
 				$payload_accessToken = "";
143 143
 			}
144 144
 			else {
Please login to merge, or discard this patch.
vote-ajax.php 1 patch
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 if((!isset($_GET['pw']) || $config['pw'] != $_GET['pw']) && !isUserAdmin())
22 22
 {
23 23
 	error_log($_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php');
24
-	$response = array("message" => $_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php',"success" => false);
24
+	$response = array("message" => $_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php',"success" => FALSE);
25 25
 	echo json_encode($response);
26 26
 	die();
27 27
 }
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 {
30 30
 
31 31
 $message = "";
32
-$success = true;
32
+$success = TRUE;
33 33
 $token = "";
34 34
 	if(isset($_POST['vote']) && isset($_POST['postId']))
35 35
 	{
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 					$response = array("success" => $jodelAccount->verifyCaptcha());
98 98
 					echo json_encode($response);
99 99
 					die();
100
-				$success = false;
100
+				$success = FALSE;
101 101
 			}
102 102
 			else
103 103
 			{
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 		else
108 108
 		{
109 109
 			$message = 'There is no account available for this jodel. Please create at least one new account to vote this jodel.';
110
-			$success = false;
110
+			$success = FALSE;
111 111
 		}
112 112
 	}
113 113
 
Please login to merge, or discard this patch.