Completed
Push — master ( 3f9de0...db9685 )
by Joe
07:15
created
bin/check_status.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 $status = $cpl->fetchLicenseRaw(['ip' => $ipAddress]);
8 8
 var_export($status);
9 9
 if (isset($status['@attributes'])) {
10
-	print 'The license id for the ip is: ' . $status['@attributes']['licenseid'].PHP_EOL;
10
+	print 'The license id for the ip is: '.$status['@attributes']['licenseid'].PHP_EOL;
11 11
 	print 'The status of the license is: ';
12 12
 	if ($status['@attributes']['valid'] > 0) {
13 13
 		print 'Active';
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 		print 'Inactive';
16 16
 	}
17 17
 	print "\n";
18
-	print 'The company holding the license is: ' . $status['@attributes']['company'].
18
+	print 'The company holding the license is: '.$status['@attributes']['company'].
19 19
 		"\n";
20 20
 } else {
21 21
 	print "The status of the license is: Not Licensed\n";
Please login to merge, or discard this patch.
bin/add_new_license.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@
 block discarded – undo
22 22
 );
23 23
 
24 24
 if ($lisc['@attributes']['status'] > 0) {
25
-	print 'license added with id: ' . $lisc['@attributes']['licenseid'].PHP_EOL;
25
+	print 'license added with id: '.$lisc['@attributes']['licenseid'].PHP_EOL;
26 26
 } else {
27
-	print 'License add failed: ' . $lisc['@attributes']['reason'].PHP_EOL;
27
+	print 'License add failed: '.$lisc['@attributes']['reason'].PHP_EOL;
28 28
 }
29 29
 
Please login to merge, or discard this patch.
bin/fetch_risk_data.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@
 block discarded – undo
13 13
 
14 14
 if ($status['@attributes']['status'] == 1) {
15 15
    print "Risk Scores for $ipAddress:\n";
16
-   print 'aggregate : ' . $status['@attributes']['riskscore.aggregate.score'].PHP_EOL;
17
-   print 'directorder : ' . $status['@attributes']['riskscore.directorder.score'].PHP_EOL;
18
-   print 'main : ' . $status['@attributes']['riskscore.main.score'].PHP_EOL;
16
+   print 'aggregate : '.$status['@attributes']['riskscore.aggregate.score'].PHP_EOL;
17
+   print 'directorder : '.$status['@attributes']['riskscore.directorder.score'].PHP_EOL;
18
+   print 'main : '.$status['@attributes']['riskscore.main.score'].PHP_EOL;
19 19
 } else {
20 20
    print "Failed to fetch risk data\n";
21 21
 }
Please login to merge, or discard this patch.
bin/list_expired_licenses.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,12 +9,12 @@
 block discarded – undo
9 9
 foreach ($licenses->licenses as $lisc) {
10 10
 	$lisc = (array) $lisc;
11 11
 	print "\nLicense IP: ".$lisc['@attributes']['ip'].PHP_EOL;
12
-	print '        ID: ' . $lisc['@attributes']['name'].PHP_EOL;
13
-	print '   groupid: ' . $lisc['@attributes']['groupid'].PHP_EOL;
14
-	print ' packageid: ' . $lisc['@attributes']['packageid'].PHP_EOL;
15
-	print '   adddate: ' . $lisc['@attributes']['adddate'].PHP_EOL;
16
-	print 'expired on: ' . $lisc['@attributes']['expiredon'].PHP_EOL;
17
-	print '    reason: ' . $lisc['@attributes']['expirereason'].PHP_EOL;
12
+	print '        ID: '.$lisc['@attributes']['name'].PHP_EOL;
13
+	print '   groupid: '.$lisc['@attributes']['groupid'].PHP_EOL;
14
+	print ' packageid: '.$lisc['@attributes']['packageid'].PHP_EOL;
15
+	print '   adddate: '.$lisc['@attributes']['adddate'].PHP_EOL;
16
+	print 'expired on: '.$lisc['@attributes']['expiredon'].PHP_EOL;
17
+	print '    reason: '.$lisc['@attributes']['expirereason'].PHP_EOL;
18 18
 }
19 19
 
20 20
 
Please login to merge, or discard this patch.
src/Cpanel.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	 * @param $pass
39 39
 	 */
40 40
 	public function setCredentials($user, $pass) {
41
-		$this->setopt(CURLOPT_USERPWD, $user. ':' .$pass);
41
+		$this->setopt(CURLOPT_USERPWD, $user.':'.$pass);
42 42
 	}
43 43
 
44 44
 	/**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 		if ($this->format != 'simplexml') {
67 67
 			$args['output'] = $this->format;
68 68
 		}
69
-		$query = 'https://manage2.cpanel.net/' .$function. '?' .http_build_query($args);
69
+		$query = 'https://manage2.cpanel.net/'.$function.'?'.http_build_query($args);
70 70
 		$this->setopt(CURLOPT_URL, $query);
71 71
 		$this->curl = curl_init();
72 72
 		foreach ($this->opts as $option => $value) {
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		$result = curl_exec($this->curl);
76 76
 		curl_close($this->curl);
77 77
 		if ($result == FALSE) {
78
-			error_log('cPanelLicensing::get failed: "' .curl_error($this->curl). '"');
78
+			error_log('cPanelLicensing::get failed: "'.curl_error($this->curl).'"');
79 79
 			return;
80 80
 		}
81 81
 		if ($this->format == 'simplexml') {
Please login to merge, or discard this patch.