Completed
Push — master ( 7fb371...314972 )
by Joe
02:54
created
src/Cloudlinux.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 */
79 79
 	public function authToken() {
80 80
 		$time = time();
81
-		return $this->login . '|' . $time . '|' . sha1($this->key . $time);
81
+		return $this->login.'|'.$time.'|'.sha1($this->key.$time);
82 82
 	}
83 83
 
84 84
 	/**
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
 		try {
172 172
 			$this->response = $xmlClient->is_licensed($this->authToken(), $ipAddress, $checkAll);
173 173
 		} catch (\Exception $e) {
174
-			$this->log('error', 'Caught exception code: ' . $e->getCode());
175
-			$this->log('error', 'Caught exception message: ' . $e->getMessage());
174
+			$this->log('error', 'Caught exception code: '.$e->getCode());
175
+			$this->log('error', 'Caught exception message: '.$e->getMessage());
176 176
 			return false;
177 177
 		}
178 178
 		return $this->response;
@@ -232,8 +232,8 @@  discard block
 block discarded – undo
232 232
 		try {
233 233
 			$this->response = $this->xmlClient->remove_license($this->authToken(), $ipAddress, $type);
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
 		return $this->response;
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 	 * @return false|array an array of licenses each one containing these fields: ip(string)   ype(int) ­ license type (1,2,16)   registered(boolean) ­ true if server was registered in CLN with this license (CLN licenses only).    created(string) ­ license creation time
263 263
 	 */
264 264
 	public function restList() {
265
-		$this->response = $this->getcurlpage($this->restUrl.'ipl/list.json?token=' . $this->authToken());
265
+		$this->response = $this->getcurlpage($this->restUrl.'ipl/list.json?token='.$this->authToken());
266 266
 		return json_decode($this->response, true);
267 267
 	}
268 268
 
@@ -298,14 +298,14 @@  discard block
 block discarded – undo
298 298
 	 * @return false|integer 0 on success, -1 on error
299 299
 	 */
300 300
 	public function license($ipAddress, $type) {
301
-		$type = (int)$type;
301
+		$type = (int) $type;
302 302
 		$xmlClient = $this->xmlClient;
303 303
 		try {
304
-			$this->log('error', 'Calling License(' . $this->authToken() . ',' . $ipAddress . ',' . $type . ')');
304
+			$this->log('error', 'Calling License('.$this->authToken().','.$ipAddress.','.$type.')');
305 305
 			return $this->response = $xmlClient->license($this->authToken(), $ipAddress, $type);
306 306
 		} catch (\Exception $e) {
307
-			$this->log('error', 'Caught exception code: ' . $e->getCode());
308
-			$this->log('error', 'Caught exception message: ' . $e->getMessage());
307
+			$this->log('error', 'Caught exception code: '.$e->getCode());
308
+			$this->log('error', 'Caught exception message: '.$e->getMessage());
309 309
 			return false;
310 310
 		}
311 311
 	}
Please login to merge, or discard this patch.