Completed
Push — master ( 576cb8...13d70e )
by Joe
02:50
created
src/Cloudlinux.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@
 block discarded – undo
28 28
  *
29 29
  * @access public
30 30
  */
31
-class Cloudlinux
32
-{
31
+class Cloudlinux {
33 32
 	private $login = '';
34 33
 	private $key = '';
35 34
 	public $prefix = 'registration.';
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	 */
78 78
 	public function authToken() {
79 79
 		$time = time();
80
-		return $this->login . '|' . $time . '|' . sha1($this->key . $time);
80
+		return $this->login.'|'.$time.'|'.sha1($this->key.$time);
81 81
 	}
82 82
 
83 83
 	/**
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
 		try {
173 173
 			$this->response = $xmlClient->is_licensed($this->authToken(), $ipAddress, $checkAll);
174 174
 		} catch (\Exception $e) {
175
-			$this->log('error', 'Caught exception code: ' . $e->getCode());
176
-			$this->log('error', 'Caught exception message: ' . $e->getMessage());
175
+			$this->log('error', 'Caught exception code: '.$e->getCode());
176
+			$this->log('error', 'Caught exception message: '.$e->getMessage());
177 177
 			return false;
178 178
 		}
179 179
 		return $this->response;
@@ -233,8 +233,8 @@  discard block
 block discarded – undo
233 233
 		try {
234 234
 			$this->response = $this->remove($ipAddress, $type);
235 235
 		} catch (\Exception $e) {
236
-			$this->log('error', 'Caught exception code: ' . $e->getCode());
237
-			$this->log('error', 'Caught exception message: ' . $e->getMessage());
236
+			$this->log('error', 'Caught exception code: '.$e->getCode());
237
+			$this->log('error', 'Caught exception message: '.$e->getMessage());
238 238
 			return false;
239 239
 		}
240 240
 		return $this->response;
@@ -264,10 +264,10 @@  discard block
 block discarded – undo
264 264
 	 */
265 265
 	public function restList() {
266 266
 		try {
267
-			$this->response = $this->getcurlpage($this->restUrl.'ipl/list.json?token=' . $this->authToken());
267
+			$this->response = $this->getcurlpage($this->restUrl.'ipl/list.json?token='.$this->authToken());
268 268
 		} catch (\Exception $e) {
269
-			$this->log('error', 'Caught exception code: ' . $e->getCode());
270
-			$this->log('error', 'Caught exception message: ' . $e->getMessage());
269
+			$this->log('error', 'Caught exception code: '.$e->getCode());
270
+			$this->log('error', 'Caught exception message: '.$e->getMessage());
271 271
 			return false;
272 272
 		}
273 273
 		return json_decode($this->response, true);
@@ -284,8 +284,8 @@  discard block
 block discarded – undo
284 284
 		try {
285 285
 			$this->response = $xmlClient->reconcile($this->authToken());
286 286
 		} catch (\Exception $e) {
287
-			$this->log('error', 'Caught exception code: ' . $e->getCode());
288
-			$this->log('error', 'Caught exception message: ' . $e->getMessage());
287
+			$this->log('error', 'Caught exception code: '.$e->getCode());
288
+			$this->log('error', 'Caught exception message: '.$e->getMessage());
289 289
 			return false;
290 290
 		}
291 291
 		return $this->response;
@@ -312,16 +312,16 @@  discard block
 block discarded – undo
312 312
 	 * @return false|integer 0 on success, -1 on error
313 313
 	 */
314 314
 	public function license($ipAddress, $type) {
315
-		$type = (int)$type;
315
+		$type = (int) $type;
316 316
 		$xmlClient = $this->xmlClient;
317 317
 		try {
318
-			$this->log('error', 'Calling License(' . $this->authToken() . ',' . $ipAddress . ',' . $type . ')');
318
+			$this->log('error', 'Calling License('.$this->authToken().','.$ipAddress.','.$type.')');
319 319
 			$this->response = $xmlClient->license($this->authToken(), $ipAddress, $type);
320
-			$this->log('error', 'Response: ' . var_export($this->response, true));
320
+			$this->log('error', 'Response: '.var_export($this->response, true));
321 321
 			return $this->response;
322 322
 		} catch (\Exception $e) {
323
-			$this->log('error', 'Caught exception code: ' . $e->getCode());
324
-			$this->log('error', 'Caught exception message: ' . $e->getMessage());
323
+			$this->log('error', 'Caught exception code: '.$e->getCode());
324
+			$this->log('error', 'Caught exception message: '.$e->getMessage());
325 325
 			return false;
326 326
 		}
327 327
 	}
Please login to merge, or discard this patch.