Test Failed
Push — master ( cc7d24...978519 )
by Joe
02:32
created
bin/list_expired_licenses.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@
 block discarded – undo
2 2
 
3 3
 include("../cpl.inc.php");
4 4
 
5
-$cpl = new \Detain\Cpanel\Cpanel($_SERVER['argv'][1],$_SERVER['argv'][2]);
5
+$cpl = new \Detain\Cpanel\Cpanel($_SERVER['argv'][1], $_SERVER['argv'][2]);
6 6
 
7 7
 $licenses = $cpl->fetchExpiredLicenses();
8 8
 
9
-foreach ( $licenses->licenses as $lisc ) {
9
+foreach ($licenses->licenses as $lisc) {
10 10
     $lisc = (array)$lisc;
11 11
     print "\nLicense IP: " . $lisc['@attributes']['ip'] . "\n";
12 12
     print "        ID: " . $lisc['@attributes']['name'] . "\n";
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@
 block discarded – undo
7 7
 $licenses = $cpl->fetchExpiredLicenses();
8 8
 
9 9
 foreach ( $licenses->licenses as $lisc ) {
10
-    $lisc = (array)$lisc;
11
-    print "\nLicense IP: " . $lisc['@attributes']['ip'] . "\n";
12
-    print "        ID: " . $lisc['@attributes']['name'] . "\n";
13
-    print "   groupid: " . $lisc['@attributes']['groupid'] . "\n";
14
-    print " packageid: " . $lisc['@attributes']['packageid'] . "\n";
15
-    print "   adddate: " . $lisc['@attributes']['adddate'] . "\n";
16
-    print "expired on: " . $lisc['@attributes']['expiredon'] . "\n";
17
-    print "    reason: " . $lisc['@attributes']['expirereason'] . "\n";
10
+	$lisc = (array)$lisc;
11
+	print "\nLicense IP: " . $lisc['@attributes']['ip'] . "\n";
12
+	print "        ID: " . $lisc['@attributes']['name'] . "\n";
13
+	print "   groupid: " . $lisc['@attributes']['groupid'] . "\n";
14
+	print " packageid: " . $lisc['@attributes']['packageid'] . "\n";
15
+	print "   adddate: " . $lisc['@attributes']['adddate'] . "\n";
16
+	print "expired on: " . $lisc['@attributes']['expiredon'] . "\n";
17
+	print "    reason: " . $lisc['@attributes']['expirereason'] . "\n";
18 18
 }
19 19
 
20 20
 
Please login to merge, or discard this patch.
bin/reactivate_license.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,12 +4,12 @@
 block discarded – undo
4 4
 
5 5
 $ip = "__IP__";
6 6
 
7
-$lisc = (array)$cpl->fetchLicenseID( array("ip" => $ip) );
7
+$lisc = (array)$cpl->fetchLicenseID(array("ip" => $ip));
8 8
 
9 9
 $id = $lisc['@attributes']['licenseid'];
10 10
 
11
-if ( $id > 0 ) {
12
-    $result = (array)$cpl->reactivateLicense( array( 'liscid' => $id, reactivateok => 1 ) );
11
+if ($id > 0) {
12
+    $result = (array)$cpl->reactivateLicense(array('liscid' => $id, reactivateok => 1));
13 13
 } else {
14 14
     print "no expired license exists for $ip\n";
15 15
 }
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,15 +9,15 @@
 block discarded – undo
9 9
 $id = $lisc['@attributes']['licenseid'];
10 10
 
11 11
 if ( $id > 0 ) {
12
-    $result = (array)$cpl->reactivateLicense( array( 'liscid' => $id, reactivateok => 1 ) );
12
+	$result = (array)$cpl->reactivateLicense( array( 'liscid' => $id, reactivateok => 1 ) );
13 13
 } else {
14
-    print "no expired license exists for $ip\n";
14
+	print "no expired license exists for $ip\n";
15 15
 }
16 16
 
17 17
 if ($result['@attributes']['status']) {
18
-    print "the liscense for $ip has been reactivated\n";
18
+	print "the liscense for $ip has been reactivated\n";
19 19
 } else {
20
-    print "Failed to reactivate license!\n";
20
+	print "Failed to reactivate license!\n";
21 21
 }
22 22
 
23 23
 
Please login to merge, or discard this patch.
bin/list_licenses.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 function_requirements('xml2array');
4 4
 include("../cpl.inc.php");
5 5
 
6
-$cpl = new \Detain\Cpanel\Cpanel($_SERVER['argv'][1],$_SERVER['argv'][2]);
6
+$cpl = new \Detain\Cpanel\Cpanel($_SERVER['argv'][1], $_SERVER['argv'][2]);
7 7
 
8 8
 $licenses = $cpl->fetchLicenses();
9 9
 print_r($licenses);
Please login to merge, or discard this patch.
bin/lookup_license_id_by_ip.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 include("../cpl.inc.php");
3 3
 $cpl = new \Detain\Cpanel\Cpanel($_SERVER['argv'][1], $_SERVER['argv'][2]);
4 4
 $ip = "__IP__";
5
-$lisc = (array) $cpl->fetchLicenseId(array("ip" => $ip));
5
+$lisc = (array)$cpl->fetchLicenseId(array("ip" => $ip));
6 6
 print_r($lisc);
7 7
 $id = $lisc['licenseid'];
8 8
 $id = is_array($id) ? $id[0] : $id;
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@
 block discarded – undo
7 7
 $id = $lisc['licenseid'];
8 8
 $id = is_array($id) ? $id[0] : $id;
9 9
 if ($id) {
10
-    print "The license id for $ip is $id\n";
10
+	print "The license id for $ip is $id\n";
11 11
 } else {
12
-    print "No valid license exists for $ip\n";
12
+	print "No valid license exists for $ip\n";
13 13
 }
14 14
 
15 15
 
Please login to merge, or discard this patch.
bin/request_transfer.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@
 block discarded – undo
4 4
 
5 5
 $ip = "__IP_TO_TRANSFER__";
6 6
 
7
-$group = $cpl->findKey("__GROUP_NAME__", $cpl->fetchGroups() );
8
-$package = $cpl->findKey("__PACKAGE_NAME__", $cpl->fetchPackages() );
7
+$group = $cpl->findKey("__GROUP_NAME__", $cpl->fetchGroups());
8
+$package = $cpl->findKey("__PACKAGE_NAME__", $cpl->fetchPackages());
9 9
 
10
-$result = (array)$cpl->requestTransfer( array(
10
+$result = (array)$cpl->requestTransfer(array(
11 11
     "ip" => $ip,
12 12
     "groupid" => $group,
13 13
     "packageid" => $package
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@
 block discarded – undo
8 8
 $package = $cpl->findKey("__PACKAGE_NAME__", $cpl->fetchPackages() );
9 9
 
10 10
 $result = (array)$cpl->requestTransfer( array(
11
-    "ip" => $ip,
12
-    "groupid" => $group,
13
-    "packageid" => $package
14
-    )
11
+	"ip" => $ip,
12
+	"groupid" => $group,
13
+	"packageid" => $package
14
+	)
15 15
 );
16 16
 
17 17
 print $result["@attributes"]['reason'] . "\n";
Please login to merge, or discard this patch.
bin/add_new_license.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,12 +2,12 @@  discard block
 block discarded – undo
2 2
 
3 3
 include("../cpl.inc.php");
4 4
 
5
-$cpl = new \Detain\Cpanel\Cpanel( $_SERVER['argv'][1], $_SERVER['argv'][2] );
5
+$cpl = new \Detain\Cpanel\Cpanel($_SERVER['argv'][1], $_SERVER['argv'][2]);
6 6
 
7 7
 $ip = "__IP__";
8 8
 
9
-$groupid = $cpl->findKey("__GROUPNAME__", $cpl->fetchGroups() );
10
-$packageid = $cpl->findKey("__PACKAGENAME__", $cpl->fetchPackages() );
9
+$groupid = $cpl->findKey("__GROUPNAME__", $cpl->fetchGroups());
10
+$packageid = $cpl->findKey("__PACKAGENAME__", $cpl->fetchPackages());
11 11
 
12 12
 $lisc = (array)$cpl->activateLicense(array(
13 13
         "ip" => $ip,
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 );
22 22
 
23 23
 if ($lisc['@attributes']['status'] > 0) {
24
-    print "license added with id: ". $lisc['@attributes']['licenseid'] . "\n";
24
+    print "license added with id: " . $lisc['@attributes']['licenseid'] . "\n";
25 25
 } else {
26 26
     print "License add failed: " . $lisc['@attributes']['reason'] . "\n";
27 27
 }
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,19 +10,19 @@
 block discarded – undo
10 10
 $packageid = $cpl->findKey("__PACKAGENAME__", $cpl->fetchPackages() );
11 11
 
12 12
 $lisc = (array)$cpl->activateLicense(array(
13
-        "ip" => $ip,
14
-        "groupid" => $groupid,
15
-        "packageid" => $packageid,
16
-        "force" => 1,
13
+		"ip" => $ip,
14
+		"groupid" => $groupid,
15
+		"packageid" => $packageid,
16
+		"force" => 1,
17 17
 #If 0 the license will not be activated if you would be billed a reactivation fee
18 18
 #If 1 the license will be activated if a fee is required (at the time of this writing, licenses reactivated within 72 hours of billing)
19
-        "reactivateok" => 1
20
-    )
19
+		"reactivateok" => 1
20
+	)
21 21
 );
22 22
 
23 23
 if ($lisc['@attributes']['status'] > 0) {
24
-    print "license added with id: ". $lisc['@attributes']['licenseid'] . "\n";
24
+	print "license added with id: ". $lisc['@attributes']['licenseid'] . "\n";
25 25
 } else {
26
-    print "License add failed: " . $lisc['@attributes']['reason'] . "\n";
26
+	print "License add failed: " . $lisc['@attributes']['reason'] . "\n";
27 27
 }
28 28
 
Please login to merge, or discard this patch.
bin/expire_license.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@
 block discarded – undo
4 4
 
5 5
 $ip = "__IP__";
6 6
 
7
-$lisc = (array)$cpl->fetchLicenseId( array( "ip" => $ip ) );
7
+$lisc = (array)$cpl->fetchLicenseId(array("ip" => $ip));
8 8
 $liscid = $lisc["@attributes"]["licenseid"];
9 9
 
10
-if ( $liscid > 0 ) {
10
+if ($liscid > 0) {
11 11
     $expire = (array)$cpl->expireLicense(array(
12 12
         liscid => $liscid,
13 13
         reason => "Automagic Expiration",
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,15 +8,15 @@
 block discarded – undo
8 8
 $liscid = $lisc["@attributes"]["licenseid"];
9 9
 
10 10
 if ( $liscid > 0 ) {
11
-    $expire = (array)$cpl->expireLicense(array(
12
-        liscid => $liscid,
13
-        reason => "Automagic Expiration",
14
-        expcode => "normal"
15
-        )
16
-    );
17
-    print $expire["@attributes"]["result"] . "\n";
11
+	$expire = (array)$cpl->expireLicense(array(
12
+		liscid => $liscid,
13
+		reason => "Automagic Expiration",
14
+		expcode => "normal"
15
+		)
16
+	);
17
+	print $expire["@attributes"]["result"] . "\n";
18 18
 } else {
19
-    print "There is no valid license for $ip\n";
19
+	print "There is no valid license for $ip\n";
20 20
 }
21 21
 
22 22
 
Please login to merge, or discard this patch.
bin/fetch_risk_data.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@
 block discarded – undo
10 10
 
11 11
 
12 12
 $status = (array)$cpl->fetchLicenseRiskData(array(
13
-    "ip" => $ip
14
-    )
13
+	"ip" => $ip
14
+	)
15 15
 );
16 16
 
17 17
 if ($status["@attributes"]["status"] == 1) {
Please login to merge, or discard this patch.
bin/change_ip.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
 $newip = "__DESTINATIONIP__";
8 8
 
9 9
 $response = (array)$cpl->changeip( array(
10
-    "oldip" => $oldip,
11
-    "newip" => $newip
10
+	"oldip" => $oldip,
11
+	"newip" => $newip
12 12
 ) );
13 13
 
14 14
 print_r($response)."\n";
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@
 block discarded – undo
6 6
 $oldip = "__SOURCEIP__";
7 7
 $newip = "__DESTINATIONIP__";
8 8
 
9
-$response = (array)$cpl->changeip( array(
9
+$response = (array)$cpl->changeip(array(
10 10
     "oldip" => $oldip,
11 11
     "newip" => $newip
12
-) );
12
+));
13 13
 
14
-print_r($response)."\n";
14
+print_r($response) . "\n";
15 15
 
16 16
 
Please login to merge, or discard this patch.