Completed
Branch master (188864)
by Joe
04:05
created
src/Cloudlinux.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 			if (is_array($postfields)) {
90 90
 				$postdata = [];
91 91
 				foreach ($postfields as $field => $value) {
92
-					$postdata[] = $field . '=' . urlencode($value);
92
+					$postdata[] = $field.'='.urlencode($value);
93 93
 				}
94 94
 				curl_setopt($ch, CURLOPT_POSTFIELDS, implode('&', $postdata));
95 95
 			} else {
@@ -208,10 +208,10 @@  discard block
 block discarded – undo
208 208
 	public function authToken() {
209 209
 		$time = time();
210 210
 		try {
211
-			return $this->login . '|' . $time . '|' . sha1($this->key . $time);
211
+			return $this->login.'|'.$time.'|'.sha1($this->key.$time);
212 212
 		} catch (Exception $e) {
213
-			$this->log('error', 'Caught exception code: ' . $e->getCode());
214
-			$this->log('error', 'Caught exception message: ' . $e->getMessage());
213
+			$this->log('error', 'Caught exception code: '.$e->getCode());
214
+			$this->log('error', 'Caught exception message: '.$e->getMessage());
215 215
 			return false;
216 216
 		}
217 217
 	}
@@ -225,15 +225,15 @@  discard block
 block discarded – undo
225 225
 	 * @return integer 0 on success, -1 on error
226 226
 	 */
227 227
 	public function license($ip, $type) {
228
-		$type = (int)$type;
228
+		$type = (int) $type;
229 229
 		try {
230
-			$this->log('error', 'Calling License(' . $this->authToken() . ',' . $ip . ',' . $type . ')');
230
+			$this->log('error', 'Calling License('.$this->authToken().','.$ip.','.$type.')');
231 231
 			$this->response = $this->xml_client->license($this->authToken(), $ip, $type);
232
-			$this->log('error', 'Response: ' . var_export($this->response, true));
232
+			$this->log('error', 'Response: '.var_export($this->response, true));
233 233
 			return $this->response;
234 234
 		} catch (Exception $e) {
235
-			$this->log('error', 'Caught exception code: ' . $e->getCode());
236
-			$this->log('error', 'Caught exception message: ' . $e->getMessage());
235
+			$this->log('error', 'Caught exception code: '.$e->getCode());
236
+			$this->log('error', 'Caught exception message: '.$e->getMessage());
237 237
 			return false;
238 238
 		}
239 239
 	}
@@ -254,8 +254,8 @@  discard block
 block discarded – undo
254 254
 			else
255 255
 				return $this->response = $this->xml_client->remove_license($this->authToken(), $ip, $type);
256 256
 		} catch (Exception $e) {
257
-			$this->log('error', 'Caught exception code: ' . $e->getCode());
258
-			$this->log('error', 'Caught exception message: ' . $e->getMessage());
257
+			$this->log('error', 'Caught exception code: '.$e->getCode());
258
+			$this->log('error', 'Caught exception message: '.$e->getMessage());
259 259
 			return false;
260 260
 		}
261 261
 	}
@@ -286,8 +286,8 @@  discard block
 block discarded – undo
286 286
 		try {
287 287
 			return $this->response = $this->xml_client->is_licensed($this->authToken(), $ip, $checkAll);
288 288
 		} catch (Exception $e) {
289
-			$this->log('error', 'Caught exception code: ' . $e->getCode());
290
-			$this->log('error', 'Caught exception message: ' . $e->getMessage());
289
+			$this->log('error', 'Caught exception code: '.$e->getCode());
290
+			$this->log('error', 'Caught exception message: '.$e->getMessage());
291 291
 			return false;
292 292
 		}
293 293
 	}
@@ -297,10 +297,10 @@  discard block
 block discarded – undo
297 297
 	 */
298 298
 	public function license_list() {
299 299
 		try {
300
-			return json_decode($this->getcurlpage($this->rest_url.'ipl/list.json?token=' . $this->authToken()));
300
+			return json_decode($this->getcurlpage($this->rest_url.'ipl/list.json?token='.$this->authToken()));
301 301
 		} catch (Exception $e) {
302
-			$this->log('error', 'Caught exception code: ' . $e->getCode());
303
-			$this->log('error', 'Caught exception message: ' . $e->getMessage());
302
+			$this->log('error', 'Caught exception code: '.$e->getCode());
303
+			$this->log('error', 'Caught exception message: '.$e->getMessage());
304 304
 			return false;
305 305
 		}
306 306
 	}
@@ -318,8 +318,8 @@  discard block
 block discarded – undo
318 318
 		try {
319 319
 			return $this->response = $this->xml_client->reconcile($this->authToken());
320 320
 		} catch (Exception $e) {
321
-			$this->log('error', 'Caught exception code: ' . $e->getCode());
322
-			$this->log('error', 'Caught exception message: ' . $e->getMessage());
321
+			$this->log('error', 'Caught exception code: '.$e->getCode());
322
+			$this->log('error', 'Caught exception message: '.$e->getMessage());
323 323
 			return false;
324 324
 		}
325 325
 	}
Please login to merge, or discard this patch.