Completed
Push — master ( ea32c0...b4cd43 )
by Joe
02:23
created
bin/check_status.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,11 +3,11 @@  discard block
 block discarded – undo
3 3
 $cpl = new \Detain\Cpanel\Cpanel($_SERVER['argv'][1], $_SERVER['argv'][2]);
4 4
 
5 5
 $ipAddress = $_SERVER['argv'][3];
6
-$cpl->format='json';
6
+$cpl->format = 'json';
7 7
 $status = json_decode($cpl->fetchLicenseRaw(['ip' => $ipAddress]), true);
8 8
 print_r($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.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 $ipAddress = $_SERVER['argv'][3];
6 6
 $cpl->format='json';
7
-$status = json_decode($cpl->fetchLicenseRaw(['ip' => $ipAddress]), true);
7
+$status = json_decode($cpl->fetchLicenseRaw(['ip' => $ipAddress]), TRUE);
8 8
 print_r($status);
9 9
 if (isset($status['@attributes'])) {
10 10
 	print 'The license id for the ip is: ' . $status['@attributes']['licenseid'].PHP_EOL;
Please login to merge, or discard this patch.