@@ -18,6 +18,9 @@ discard block |
||
18 | 18 | $this->setopt(CURLOPT_USERAGENT, 'cPanel Licensing Agent (php) 3.5' ); |
19 | 19 | } |
20 | 20 | |
21 | + /** |
|
22 | + * @param integer $option |
|
23 | + */ |
|
21 | 24 | public function setopt($option, $value) { |
22 | 25 | $this->opts[$option] = $value; |
23 | 26 | } |
@@ -36,6 +39,9 @@ discard block |
||
36 | 39 | } |
37 | 40 | } |
38 | 41 | |
42 | + /** |
|
43 | + * @param string $function |
|
44 | + */ |
|
39 | 45 | private function get ($function, $args = array()) { |
40 | 46 | if (!$function) { |
41 | 47 | error_log("cPanelLicensing::get requires that a function is defined"); |
@@ -7,26 +7,26 @@ discard block |
||
7 | 7 | public $curl; |
8 | 8 | public $opts; |
9 | 9 | |
10 | - public function __construct ($user, $pass) { |
|
10 | + public function __construct($user, $pass) { |
|
11 | 11 | if (!function_exists('curl_init')) { |
12 | 12 | die("cPanelLicensing requires that curl+ssl support is compiled into the PHP interpreter"); |
13 | 13 | } |
14 | 14 | $this->opts = []; |
15 | 15 | $this->format = "simplexml"; |
16 | 16 | $this->setCredentials($user, $pass); |
17 | - $this->setopt(CURLOPT_RETURNTRANSFER,1); |
|
18 | - $this->setopt(CURLOPT_USERAGENT, 'cPanel Licensing Agent (php) 3.5' ); |
|
17 | + $this->setopt(CURLOPT_RETURNTRANSFER, 1); |
|
18 | + $this->setopt(CURLOPT_USERAGENT, 'cPanel Licensing Agent (php) 3.5'); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | public function setopt($option, $value) { |
22 | 22 | $this->opts[$option] = $value; |
23 | 23 | } |
24 | 24 | |
25 | - public function setCredentials ($user, $pass) { |
|
25 | + public function setCredentials($user, $pass) { |
|
26 | 26 | $this->setopt(CURLOPT_USERPWD, $user . ":" . $pass); |
27 | 27 | } |
28 | 28 | |
29 | - public function set_format ($format) { |
|
29 | + public function set_format($format) { |
|
30 | 30 | if ($format != "xml" && $format != "json" && $format != "yaml" && $format != "simplexml") { |
31 | 31 | error_log("set_format requires that the format is xml, json, yaml or simplexml"); |
32 | 32 | return; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | } |
37 | 37 | } |
38 | 38 | |
39 | - private function get ($function, $args = array()) { |
|
39 | + private function get($function, $args = array()) { |
|
40 | 40 | if (!$function) { |
41 | 41 | error_log("cPanelLicensing::get requires that a function is defined"); |
42 | 42 | return; |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | return $result; |
84 | 84 | } |
85 | 85 | |
86 | - private function validateID ($id) { |
|
86 | + private function validateID($id) { |
|
87 | 87 | if (preg_match("/^(L|P|G)?\d*$/", $id)) { |
88 | 88 | return 1; |
89 | 89 | } |
@@ -92,11 +92,11 @@ discard block |
||
92 | 92 | } |
93 | 93 | } |
94 | 94 | |
95 | - private function validateIP ($ip) { |
|
95 | + private function validateIP($ip) { |
|
96 | 96 | return preg_match("/^\d*\.\d*\.\d*\.\d*$/", $ip); |
97 | 97 | } |
98 | 98 | |
99 | - public function reactivateLicense ($args) { |
|
99 | + public function reactivateLicense($args) { |
|
100 | 100 | if (!array_key_exists('liscid', $args)) { |
101 | 101 | error_log("cpanelLicensing::reactivateLicense requires that the argument array contains element liscid"); |
102 | 102 | return; |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | return $this->get("XMLlicenseReActivate.cgi", $args); |
109 | 109 | } |
110 | 110 | |
111 | - public function expireLicense ($args) { |
|
111 | + public function expireLicense($args) { |
|
112 | 112 | if (!array_key_exists("liscid", $args)) { |
113 | 113 | error_log("cPanelLicensing::expireLicense requires that liscid elements exists in the array passed to it"); |
114 | 114 | return; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | return $this->get("XMLlicenseExpire.cgi", $args); |
121 | 121 | } |
122 | 122 | |
123 | - public function extendOnetimeUpdates ($args) { |
|
123 | + public function extendOnetimeUpdates($args) { |
|
124 | 124 | if (!array_key_exists("ip", $args)) { |
125 | 125 | error_log("cpanelLicensing::extendOnetimeUpdates requires that the element ip exists in the array is passed to it"); |
126 | 126 | return; |
@@ -129,10 +129,10 @@ discard block |
||
129 | 129 | error_log("cpanelLicensing::extendOnetimeUpdates was passed an invalid ip"); |
130 | 130 | return; |
131 | 131 | } |
132 | - return $this->get( "XMLonetimeext.cgi", $args ); |
|
132 | + return $this->get("XMLonetimeext.cgi", $args); |
|
133 | 133 | } |
134 | 134 | |
135 | - public function changeip ($args) { |
|
135 | + public function changeip($args) { |
|
136 | 136 | if (!array_key_exists("oldip", $args) || !array_key_exists("newip", $args)) { |
137 | 137 | error_log("cpanelLicensing::changeip requires that oldip and newip elements exist in the array passed to it"); |
138 | 138 | return; |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | return $this->get("XMLtransfer.cgi", $args); |
145 | 145 | } |
146 | 146 | |
147 | - public function requestTransfer ($args) { |
|
148 | - if (!array_key_exists("ip", $args) || !array_key_exists("groupid", $args ) || !array_key_exists("packagegroup", $args)) { |
|
147 | + public function requestTransfer($args) { |
|
148 | + if (!array_key_exists("ip", $args) || !array_key_exists("groupid", $args) || !array_key_exists("packagegroup", $args)) { |
|
149 | 149 | error_log("cpanelLicensing::requestTransfer requires that ip, groupid and packageid elements exist in the array passed to it"); |
150 | 150 | return; |
151 | 151 | } |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | error_log("The groupid passed to cpanelLicensing::requestTransfer is invalid"); |
154 | 154 | return; |
155 | 155 | } |
156 | - if (!$this->validateID( $args["packageid"])) { |
|
156 | + if (!$this->validateID($args["packageid"])) { |
|
157 | 157 | error_log("The package id passed to cpanelLicensing::requestTransfer is invalid"); |
158 | 158 | return; |
159 | 159 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | return $this->get("XMLtransferRequest.cgi", $args); |
165 | 165 | } |
166 | 166 | |
167 | - public function activateLicense ($args) { |
|
167 | + public function activateLicense($args) { |
|
168 | 168 | if (!array_key_exists("ip", $args) || !array_key_exists("groupid", $args) || !array_key_exists("packageid", $args)) { |
169 | 169 | error_log("cpanelLicensing::activateLicense requires that ip, groupid and packageid elements exist in the array passed to it"); |
170 | 170 | return; |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | return $this->get("XMLlicenseAdd.cgi", $args); |
186 | 186 | } |
187 | 187 | |
188 | - public function addPickupPass ($args) { |
|
188 | + public function addPickupPass($args) { |
|
189 | 189 | if (!array_key_exists("pickup", $args)) { |
190 | 190 | error_log("cPanelLicensing::addPickupPass requires a pickup param"); |
191 | 191 | return; |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | return $this->get("XMLaddPickupPass.cgi", $args); |
194 | 194 | } |
195 | 195 | |
196 | - public function registerAuth ($args) { |
|
196 | + public function registerAuth($args) { |
|
197 | 197 | if (!array_key_exists("user", $args)) { |
198 | 198 | error_log("cPanelLicensing::registerAuth requires a user param"); |
199 | 199 | return; |
@@ -213,11 +213,11 @@ discard block |
||
213 | 213 | return $response; |
214 | 214 | } |
215 | 215 | |
216 | - public function fetchGroups () { |
|
216 | + public function fetchGroups() { |
|
217 | 217 | return $this->get("XMLgroupInfo.cgi"); |
218 | 218 | } |
219 | 219 | |
220 | - public function fetchLicenseRiskData ($args) { |
|
220 | + public function fetchLicenseRiskData($args) { |
|
221 | 221 | if (!array_key_exists("ip", $args)) { |
222 | 222 | error_log("cpanelLicensing::fetchLicenseRiskData requires that ip exists as an element in the array is passed to it"); |
223 | 223 | return; |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | return $this->get("XMLsecverify.cgi", $args); |
230 | 230 | } |
231 | 231 | |
232 | - public function fetchLicenseRaw ($args) { |
|
232 | + public function fetchLicenseRaw($args) { |
|
233 | 233 | $args = array_merge(array("all" => 1), $args); |
234 | 234 | if (!array_key_exists("ip", $args)) { |
235 | 235 | error_log("cpanelLicesning::fetchLicenseRaw requires that ip exists as an element in the array is passed to it"); |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | return $this->get("XMLRawlookup.cgi", $args); |
243 | 243 | } |
244 | 244 | |
245 | - public function fetchLicenseId ($args) { |
|
245 | + public function fetchLicenseId($args) { |
|
246 | 246 | $args = array_merge(array("all" => 1), $args); |
247 | 247 | if (!array_key_exists('ip', $args)) { |
248 | 248 | error_log("cpanelLicensing::getLicenseId requires that an IP is passed to it"); |
@@ -255,20 +255,20 @@ discard block |
||
255 | 255 | return $this->get("XMLlookup.cgi", $args); |
256 | 256 | } |
257 | 257 | |
258 | - public function fetchPackages () { |
|
258 | + public function fetchPackages() { |
|
259 | 259 | return $this->get("XMLpackageInfo.cgi"); |
260 | 260 | } |
261 | 261 | |
262 | - public function fetchLicenses () { |
|
262 | + public function fetchLicenses() { |
|
263 | 263 | return $this->get("XMLlicenseInfo.cgi"); |
264 | 264 | } |
265 | 265 | |
266 | - public function fetchExpiredLicenses () { |
|
266 | + public function fetchExpiredLicenses() { |
|
267 | 267 | return $this->get("XMLlicenseInfo.cgi", array("expired" => '1')); |
268 | 268 | } |
269 | 269 | |
270 | - public function findKey ($search, $xml_obj) { |
|
271 | - $xml_obj = (array) $xml_obj; |
|
270 | + public function findKey($search, $xml_obj) { |
|
271 | + $xml_obj = (array)$xml_obj; |
|
272 | 272 | if (array_key_exists("packages", $xml_obj)) { |
273 | 273 | $type = "packages"; |
274 | 274 | } |
@@ -279,9 +279,9 @@ discard block |
||
279 | 279 | error_log("cPanelLicensing::findKey with an object that is not groups or packages"); |
280 | 280 | return; |
281 | 281 | } |
282 | - foreach ((array) $xml_obj[$type] as $element) { |
|
283 | - foreach ((array) $element as $key => $value) { |
|
284 | - if ((string) $value == $search) { |
|
282 | + foreach ((array)$xml_obj[$type] as $element) { |
|
283 | + foreach ((array)$element as $key => $value) { |
|
284 | + if ((string)$value == $search) { |
|
285 | 285 | return (string)$key; |
286 | 286 | } |
287 | 287 | } |
@@ -30,8 +30,7 @@ discard block |
||
30 | 30 | if ($format != "xml" && $format != "json" && $format != "yaml" && $format != "simplexml") { |
31 | 31 | error_log("set_format requires that the format is xml, json, yaml or simplexml"); |
32 | 32 | return; |
33 | - } |
|
34 | - else { |
|
33 | + } else { |
|
35 | 34 | $this->format = $format; |
36 | 35 | } |
37 | 36 | } |
@@ -62,8 +61,7 @@ discard block |
||
62 | 61 | $result = $result[str_replace('.cgi', '', $function)]; |
63 | 62 | $result = $this->format_result($result); |
64 | 63 | return $result; |
65 | - } |
|
66 | - else { |
|
64 | + } else { |
|
67 | 65 | return $result; |
68 | 66 | } |
69 | 67 | } |
@@ -86,8 +84,7 @@ discard block |
||
86 | 84 | private function validateID ($id) { |
87 | 85 | if (preg_match("/^(L|P|G)?\d*$/", $id)) { |
88 | 86 | return 1; |
89 | - } |
|
90 | - else { |
|
87 | + } else { |
|
91 | 88 | return 0; |
92 | 89 | } |
93 | 90 | } |
@@ -271,11 +268,9 @@ discard block |
||
271 | 268 | $xml_obj = (array) $xml_obj; |
272 | 269 | if (array_key_exists("packages", $xml_obj)) { |
273 | 270 | $type = "packages"; |
274 | - } |
|
275 | - else if (array_key_exists("groups", $xml_obj)) { |
|
271 | + } else if (array_key_exists("groups", $xml_obj)) { |
|
276 | 272 | $type = "groups"; |
277 | - } |
|
278 | - else { |
|
273 | + } else { |
|
279 | 274 | error_log("cPanelLicensing::findKey with an object that is not groups or packages"); |
280 | 275 | return; |
281 | 276 | } |
@@ -7,66 +7,66 @@ discard block |
||
7 | 7 | public $curl; |
8 | 8 | public $opts; |
9 | 9 | |
10 | - public function __construct ($user, $pass) { |
|
11 | - if (!function_exists('curl_init')) { |
|
12 | - die("cPanelLicensing requires that curl+ssl support is compiled into the PHP interpreter"); |
|
13 | - } |
|
10 | + public function __construct ($user, $pass) { |
|
11 | + if (!function_exists('curl_init')) { |
|
12 | + die("cPanelLicensing requires that curl+ssl support is compiled into the PHP interpreter"); |
|
13 | + } |
|
14 | 14 | $this->opts = []; |
15 | - $this->format = "simplexml"; |
|
16 | - $this->setCredentials($user, $pass); |
|
17 | - $this->setopt(CURLOPT_RETURNTRANSFER,1); |
|
18 | - $this->setopt(CURLOPT_USERAGENT, 'cPanel Licensing Agent (php) 3.5' ); |
|
19 | - } |
|
15 | + $this->format = "simplexml"; |
|
16 | + $this->setCredentials($user, $pass); |
|
17 | + $this->setopt(CURLOPT_RETURNTRANSFER,1); |
|
18 | + $this->setopt(CURLOPT_USERAGENT, 'cPanel Licensing Agent (php) 3.5' ); |
|
19 | + } |
|
20 | 20 | |
21 | 21 | public function setopt($option, $value) { |
22 | 22 | $this->opts[$option] = $value; |
23 | 23 | } |
24 | 24 | |
25 | - public function setCredentials ($user, $pass) { |
|
26 | - $this->setopt(CURLOPT_USERPWD, $user . ":" . $pass); |
|
27 | - } |
|
25 | + public function setCredentials ($user, $pass) { |
|
26 | + $this->setopt(CURLOPT_USERPWD, $user . ":" . $pass); |
|
27 | + } |
|
28 | 28 | |
29 | - public function set_format ($format) { |
|
30 | - if ($format != "xml" && $format != "json" && $format != "yaml" && $format != "simplexml") { |
|
31 | - error_log("set_format requires that the format is xml, json, yaml or simplexml"); |
|
32 | - return; |
|
33 | - } |
|
34 | - else { |
|
35 | - $this->format = $format; |
|
36 | - } |
|
37 | - } |
|
29 | + public function set_format ($format) { |
|
30 | + if ($format != "xml" && $format != "json" && $format != "yaml" && $format != "simplexml") { |
|
31 | + error_log("set_format requires that the format is xml, json, yaml or simplexml"); |
|
32 | + return; |
|
33 | + } |
|
34 | + else { |
|
35 | + $this->format = $format; |
|
36 | + } |
|
37 | + } |
|
38 | 38 | |
39 | - private function get ($function, $args = array()) { |
|
40 | - if (!$function) { |
|
41 | - error_log("cPanelLicensing::get requires that a function is defined"); |
|
42 | - return; |
|
43 | - } |
|
44 | - if ($this->format != "simplexml") { |
|
45 | - $args['output'] = $format; |
|
46 | - } |
|
47 | - $query = "https://manage2.cpanel.net/" . $function . "?" . http_build_query($args); |
|
48 | - $this->setopt(CURLOPT_URL, $query); |
|
39 | + private function get ($function, $args = array()) { |
|
40 | + if (!$function) { |
|
41 | + error_log("cPanelLicensing::get requires that a function is defined"); |
|
42 | + return; |
|
43 | + } |
|
44 | + if ($this->format != "simplexml") { |
|
45 | + $args['output'] = $format; |
|
46 | + } |
|
47 | + $query = "https://manage2.cpanel.net/" . $function . "?" . http_build_query($args); |
|
48 | + $this->setopt(CURLOPT_URL, $query); |
|
49 | 49 | $this->curl = curl_init(); |
50 | 50 | foreach ($this->opts as $option => $value) { |
51 | 51 | curl_setopt($this->curl, $option, $value); |
52 | 52 | } |
53 | - $result = curl_exec($this->curl); |
|
53 | + $result = curl_exec($this->curl); |
|
54 | 54 | curl_close($this->curl); |
55 | - if ($result == false) { |
|
56 | - error_log("cPanelLicensing::get failed: \"" . curl_error($this->curl) . "\""); |
|
57 | - return; |
|
58 | - } |
|
59 | - if ($this->format == "simplexml") { |
|
55 | + if ($result == false) { |
|
56 | + error_log("cPanelLicensing::get failed: \"" . curl_error($this->curl) . "\""); |
|
57 | + return; |
|
58 | + } |
|
59 | + if ($this->format == "simplexml") { |
|
60 | 60 | function_requirements('xml2array'); |
61 | 61 | $result = xml2array($result, 1, 'attribute'); |
62 | 62 | $result = $result[str_replace('.cgi', '', $function)]; |
63 | 63 | $result = $this->format_result($result); |
64 | 64 | return $result; |
65 | - } |
|
66 | - else { |
|
67 | - return $result; |
|
68 | - } |
|
69 | - } |
|
65 | + } |
|
66 | + else { |
|
67 | + return $result; |
|
68 | + } |
|
69 | + } |
|
70 | 70 | |
71 | 71 | private function format_result($result) { |
72 | 72 | if (is_array($result)) { |
@@ -83,210 +83,210 @@ discard block |
||
83 | 83 | return $result; |
84 | 84 | } |
85 | 85 | |
86 | - private function validateID ($id) { |
|
87 | - if (preg_match("/^(L|P|G)?\d*$/", $id)) { |
|
88 | - return 1; |
|
89 | - } |
|
90 | - else { |
|
91 | - return 0; |
|
92 | - } |
|
93 | - } |
|
86 | + private function validateID ($id) { |
|
87 | + if (preg_match("/^(L|P|G)?\d*$/", $id)) { |
|
88 | + return 1; |
|
89 | + } |
|
90 | + else { |
|
91 | + return 0; |
|
92 | + } |
|
93 | + } |
|
94 | 94 | |
95 | - private function validateIP ($ip) { |
|
96 | - return preg_match("/^\d*\.\d*\.\d*\.\d*$/", $ip); |
|
97 | - } |
|
95 | + private function validateIP ($ip) { |
|
96 | + return preg_match("/^\d*\.\d*\.\d*\.\d*$/", $ip); |
|
97 | + } |
|
98 | 98 | |
99 | - public function reactivateLicense ($args) { |
|
100 | - if (!array_key_exists('liscid', $args)) { |
|
101 | - error_log("cpanelLicensing::reactivateLicense requires that the argument array contains element liscid"); |
|
102 | - return; |
|
103 | - } |
|
104 | - if (!$this->validateID($args['liscid'])) { |
|
105 | - error_log("The liscid passed to cpanelLicenseing::reactivateLicense was invalid"); |
|
106 | - return; |
|
107 | - } |
|
108 | - return $this->get("XMLlicenseReActivate.cgi", $args); |
|
109 | - } |
|
99 | + public function reactivateLicense ($args) { |
|
100 | + if (!array_key_exists('liscid', $args)) { |
|
101 | + error_log("cpanelLicensing::reactivateLicense requires that the argument array contains element liscid"); |
|
102 | + return; |
|
103 | + } |
|
104 | + if (!$this->validateID($args['liscid'])) { |
|
105 | + error_log("The liscid passed to cpanelLicenseing::reactivateLicense was invalid"); |
|
106 | + return; |
|
107 | + } |
|
108 | + return $this->get("XMLlicenseReActivate.cgi", $args); |
|
109 | + } |
|
110 | 110 | |
111 | - public function expireLicense ($args) { |
|
112 | - if (!array_key_exists("liscid", $args)) { |
|
113 | - error_log("cPanelLicensing::expireLicense requires that liscid elements exists in the array passed to it"); |
|
114 | - return; |
|
115 | - } |
|
116 | - if (!$this->validateID($args['liscid'])) { |
|
117 | - error_log("the liscense ID passed to cpanelLicensing::expireLiscense was invalid"); |
|
118 | - return; |
|
119 | - } |
|
120 | - return $this->get("XMLlicenseExpire.cgi", $args); |
|
121 | - } |
|
111 | + public function expireLicense ($args) { |
|
112 | + if (!array_key_exists("liscid", $args)) { |
|
113 | + error_log("cPanelLicensing::expireLicense requires that liscid elements exists in the array passed to it"); |
|
114 | + return; |
|
115 | + } |
|
116 | + if (!$this->validateID($args['liscid'])) { |
|
117 | + error_log("the liscense ID passed to cpanelLicensing::expireLiscense was invalid"); |
|
118 | + return; |
|
119 | + } |
|
120 | + return $this->get("XMLlicenseExpire.cgi", $args); |
|
121 | + } |
|
122 | 122 | |
123 | - public function extendOnetimeUpdates ($args) { |
|
124 | - if (!array_key_exists("ip", $args)) { |
|
125 | - error_log("cpanelLicensing::extendOnetimeUpdates requires that the element ip exists in the array is passed to it"); |
|
126 | - return; |
|
127 | - } |
|
128 | - if (!$this->validateIP($args['ip'])) { |
|
129 | - error_log("cpanelLicensing::extendOnetimeUpdates was passed an invalid ip"); |
|
130 | - return; |
|
131 | - } |
|
132 | - return $this->get( "XMLonetimeext.cgi", $args ); |
|
133 | - } |
|
123 | + public function extendOnetimeUpdates ($args) { |
|
124 | + if (!array_key_exists("ip", $args)) { |
|
125 | + error_log("cpanelLicensing::extendOnetimeUpdates requires that the element ip exists in the array is passed to it"); |
|
126 | + return; |
|
127 | + } |
|
128 | + if (!$this->validateIP($args['ip'])) { |
|
129 | + error_log("cpanelLicensing::extendOnetimeUpdates was passed an invalid ip"); |
|
130 | + return; |
|
131 | + } |
|
132 | + return $this->get( "XMLonetimeext.cgi", $args ); |
|
133 | + } |
|
134 | 134 | |
135 | - public function changeip ($args) { |
|
136 | - if (!array_key_exists("oldip", $args) || !array_key_exists("newip", $args)) { |
|
137 | - error_log("cpanelLicensing::changeip requires that oldip and newip elements exist in the array passed to it"); |
|
138 | - return; |
|
139 | - } |
|
140 | - if (!$this->validateIP($args["newip"])) { |
|
141 | - error_log("the newip passed to cpanelLicensing::changeip was invalid"); |
|
142 | - return; |
|
143 | - } |
|
144 | - return $this->get("XMLtransfer.cgi", $args); |
|
145 | - } |
|
135 | + public function changeip ($args) { |
|
136 | + if (!array_key_exists("oldip", $args) || !array_key_exists("newip", $args)) { |
|
137 | + error_log("cpanelLicensing::changeip requires that oldip and newip elements exist in the array passed to it"); |
|
138 | + return; |
|
139 | + } |
|
140 | + if (!$this->validateIP($args["newip"])) { |
|
141 | + error_log("the newip passed to cpanelLicensing::changeip was invalid"); |
|
142 | + return; |
|
143 | + } |
|
144 | + return $this->get("XMLtransfer.cgi", $args); |
|
145 | + } |
|
146 | 146 | |
147 | - public function requestTransfer ($args) { |
|
148 | - if (!array_key_exists("ip", $args) || !array_key_exists("groupid", $args ) || !array_key_exists("packagegroup", $args)) { |
|
149 | - error_log("cpanelLicensing::requestTransfer requires that ip, groupid and packageid elements exist in the array passed to it"); |
|
150 | - return; |
|
151 | - } |
|
152 | - if (!$this->validateID($args["groupid"])) { |
|
153 | - error_log("The groupid passed to cpanelLicensing::requestTransfer is invalid"); |
|
154 | - return; |
|
155 | - } |
|
156 | - if (!$this->validateID( $args["packageid"])) { |
|
157 | - error_log("The package id passed to cpanelLicensing::requestTransfer is invalid"); |
|
158 | - return; |
|
159 | - } |
|
160 | - if (!$this->validateIP($args['ip'])) { |
|
161 | - error_log("the ip passed to cpanelLicensing::requestTransfer was invalid"); |
|
162 | - return; |
|
163 | - } |
|
164 | - return $this->get("XMLtransferRequest.cgi", $args); |
|
165 | - } |
|
147 | + public function requestTransfer ($args) { |
|
148 | + if (!array_key_exists("ip", $args) || !array_key_exists("groupid", $args ) || !array_key_exists("packagegroup", $args)) { |
|
149 | + error_log("cpanelLicensing::requestTransfer requires that ip, groupid and packageid elements exist in the array passed to it"); |
|
150 | + return; |
|
151 | + } |
|
152 | + if (!$this->validateID($args["groupid"])) { |
|
153 | + error_log("The groupid passed to cpanelLicensing::requestTransfer is invalid"); |
|
154 | + return; |
|
155 | + } |
|
156 | + if (!$this->validateID( $args["packageid"])) { |
|
157 | + error_log("The package id passed to cpanelLicensing::requestTransfer is invalid"); |
|
158 | + return; |
|
159 | + } |
|
160 | + if (!$this->validateIP($args['ip'])) { |
|
161 | + error_log("the ip passed to cpanelLicensing::requestTransfer was invalid"); |
|
162 | + return; |
|
163 | + } |
|
164 | + return $this->get("XMLtransferRequest.cgi", $args); |
|
165 | + } |
|
166 | 166 | |
167 | - public function activateLicense ($args) { |
|
168 | - if (!array_key_exists("ip", $args) || !array_key_exists("groupid", $args) || !array_key_exists("packageid", $args)) { |
|
169 | - error_log("cpanelLicensing::activateLicense requires that ip, groupid and packageid elements exist in the array passed to it"); |
|
170 | - return; |
|
171 | - } |
|
172 | - if (!$this->validateID($args['groupid'])) { |
|
173 | - error_log("cpanelLicensing::acivateLicense was passed an invalid groupid"); |
|
174 | - return; |
|
175 | - } |
|
176 | - if (!$this->validateIP($args['ip'])) { |
|
177 | - error_log("cpanelLicensing::activateLicense was passed an invalid IP"); |
|
178 | - return; |
|
179 | - } |
|
180 | - if (!$this->validateID($args['packageid'])) { |
|
181 | - error_log("cpanelLicensing::activateLicense was passed an invalid packageid"); |
|
182 | - return; |
|
183 | - } |
|
184 | - $args['legal'] = 1; |
|
185 | - return $this->get("XMLlicenseAdd.cgi", $args); |
|
186 | - } |
|
167 | + public function activateLicense ($args) { |
|
168 | + if (!array_key_exists("ip", $args) || !array_key_exists("groupid", $args) || !array_key_exists("packageid", $args)) { |
|
169 | + error_log("cpanelLicensing::activateLicense requires that ip, groupid and packageid elements exist in the array passed to it"); |
|
170 | + return; |
|
171 | + } |
|
172 | + if (!$this->validateID($args['groupid'])) { |
|
173 | + error_log("cpanelLicensing::acivateLicense was passed an invalid groupid"); |
|
174 | + return; |
|
175 | + } |
|
176 | + if (!$this->validateIP($args['ip'])) { |
|
177 | + error_log("cpanelLicensing::activateLicense was passed an invalid IP"); |
|
178 | + return; |
|
179 | + } |
|
180 | + if (!$this->validateID($args['packageid'])) { |
|
181 | + error_log("cpanelLicensing::activateLicense was passed an invalid packageid"); |
|
182 | + return; |
|
183 | + } |
|
184 | + $args['legal'] = 1; |
|
185 | + return $this->get("XMLlicenseAdd.cgi", $args); |
|
186 | + } |
|
187 | 187 | |
188 | - public function addPickupPass ($args) { |
|
189 | - if (!array_key_exists("pickup", $args)) { |
|
190 | - error_log("cPanelLicensing::addPickupPass requires a pickup param"); |
|
191 | - return; |
|
192 | - } |
|
193 | - return $this->get("XMLaddPickupPass.cgi", $args); |
|
194 | - } |
|
188 | + public function addPickupPass ($args) { |
|
189 | + if (!array_key_exists("pickup", $args)) { |
|
190 | + error_log("cPanelLicensing::addPickupPass requires a pickup param"); |
|
191 | + return; |
|
192 | + } |
|
193 | + return $this->get("XMLaddPickupPass.cgi", $args); |
|
194 | + } |
|
195 | 195 | |
196 | - public function registerAuth ($args) { |
|
197 | - if (!array_key_exists("user", $args)) { |
|
198 | - error_log("cPanelLicensing::registerAuth requires a user param"); |
|
199 | - return; |
|
200 | - } |
|
201 | - if (!array_key_exists("pickup", $args)) { |
|
202 | - error_log("cPanelLicensing::registerAuth requires a pickup param"); |
|
203 | - return; |
|
204 | - } |
|
205 | - if (!array_key_exists("service", $args)) { |
|
206 | - error_log("cPanelLicensing::registerAuth requires a service param"); |
|
207 | - return; |
|
208 | - } |
|
209 | - $response = $this->get("XMLregisterAuth.cgi", $args); |
|
210 | - if ($this->format == "simplexml") { |
|
211 | - $this->setCredentials($args["user"], $response["key"]); |
|
212 | - } |
|
213 | - return $response; |
|
214 | - } |
|
196 | + public function registerAuth ($args) { |
|
197 | + if (!array_key_exists("user", $args)) { |
|
198 | + error_log("cPanelLicensing::registerAuth requires a user param"); |
|
199 | + return; |
|
200 | + } |
|
201 | + if (!array_key_exists("pickup", $args)) { |
|
202 | + error_log("cPanelLicensing::registerAuth requires a pickup param"); |
|
203 | + return; |
|
204 | + } |
|
205 | + if (!array_key_exists("service", $args)) { |
|
206 | + error_log("cPanelLicensing::registerAuth requires a service param"); |
|
207 | + return; |
|
208 | + } |
|
209 | + $response = $this->get("XMLregisterAuth.cgi", $args); |
|
210 | + if ($this->format == "simplexml") { |
|
211 | + $this->setCredentials($args["user"], $response["key"]); |
|
212 | + } |
|
213 | + return $response; |
|
214 | + } |
|
215 | 215 | |
216 | - public function fetchGroups () { |
|
217 | - return $this->get("XMLgroupInfo.cgi"); |
|
218 | - } |
|
216 | + public function fetchGroups () { |
|
217 | + return $this->get("XMLgroupInfo.cgi"); |
|
218 | + } |
|
219 | 219 | |
220 | - public function fetchLicenseRiskData ($args) { |
|
221 | - if (!array_key_exists("ip", $args)) { |
|
222 | - error_log("cpanelLicensing::fetchLicenseRiskData requires that ip exists as an element in the array is passed to it"); |
|
223 | - return; |
|
224 | - } |
|
225 | - if (!$this->validateIP($args['ip'])) { |
|
226 | - error_log("cpanelLicensing::fetchLicenseRiskData was passed an invalid ip"); |
|
227 | - return; |
|
228 | - } |
|
229 | - return $this->get("XMLsecverify.cgi", $args); |
|
230 | - } |
|
220 | + public function fetchLicenseRiskData ($args) { |
|
221 | + if (!array_key_exists("ip", $args)) { |
|
222 | + error_log("cpanelLicensing::fetchLicenseRiskData requires that ip exists as an element in the array is passed to it"); |
|
223 | + return; |
|
224 | + } |
|
225 | + if (!$this->validateIP($args['ip'])) { |
|
226 | + error_log("cpanelLicensing::fetchLicenseRiskData was passed an invalid ip"); |
|
227 | + return; |
|
228 | + } |
|
229 | + return $this->get("XMLsecverify.cgi", $args); |
|
230 | + } |
|
231 | 231 | |
232 | - public function fetchLicenseRaw ($args) { |
|
233 | - $args = array_merge(array("all" => 1), $args); |
|
234 | - if (!array_key_exists("ip", $args)) { |
|
235 | - error_log("cpanelLicesning::fetchLicenseRaw requires that ip exists as an element in the array is passed to it"); |
|
236 | - return; |
|
237 | - } |
|
238 | - if (!$this->validateIP($args['ip'])) { |
|
239 | - error_log("cpanelLicensing::fetchLicenseRaw was passed an invalid ip"); |
|
240 | - return; |
|
241 | - } |
|
242 | - return $this->get("XMLRawlookup.cgi", $args); |
|
243 | - } |
|
232 | + public function fetchLicenseRaw ($args) { |
|
233 | + $args = array_merge(array("all" => 1), $args); |
|
234 | + if (!array_key_exists("ip", $args)) { |
|
235 | + error_log("cpanelLicesning::fetchLicenseRaw requires that ip exists as an element in the array is passed to it"); |
|
236 | + return; |
|
237 | + } |
|
238 | + if (!$this->validateIP($args['ip'])) { |
|
239 | + error_log("cpanelLicensing::fetchLicenseRaw was passed an invalid ip"); |
|
240 | + return; |
|
241 | + } |
|
242 | + return $this->get("XMLRawlookup.cgi", $args); |
|
243 | + } |
|
244 | 244 | |
245 | - public function fetchLicenseId ($args) { |
|
246 | - $args = array_merge(array("all" => 1), $args); |
|
247 | - if (!array_key_exists('ip', $args)) { |
|
248 | - error_log("cpanelLicensing::getLicenseId requires that an IP is passed to it"); |
|
249 | - return; |
|
250 | - } |
|
251 | - if (!$this->validateIP($args['ip'])) { |
|
252 | - error_log("cpanelLicensing::fetchLicenseId was passed an invalid ip"); |
|
253 | - return; |
|
254 | - } |
|
255 | - return $this->get("XMLlookup.cgi", $args); |
|
256 | - } |
|
245 | + public function fetchLicenseId ($args) { |
|
246 | + $args = array_merge(array("all" => 1), $args); |
|
247 | + if (!array_key_exists('ip', $args)) { |
|
248 | + error_log("cpanelLicensing::getLicenseId requires that an IP is passed to it"); |
|
249 | + return; |
|
250 | + } |
|
251 | + if (!$this->validateIP($args['ip'])) { |
|
252 | + error_log("cpanelLicensing::fetchLicenseId was passed an invalid ip"); |
|
253 | + return; |
|
254 | + } |
|
255 | + return $this->get("XMLlookup.cgi", $args); |
|
256 | + } |
|
257 | 257 | |
258 | - public function fetchPackages () { |
|
259 | - return $this->get("XMLpackageInfo.cgi"); |
|
260 | - } |
|
258 | + public function fetchPackages () { |
|
259 | + return $this->get("XMLpackageInfo.cgi"); |
|
260 | + } |
|
261 | 261 | |
262 | - public function fetchLicenses () { |
|
263 | - return $this->get("XMLlicenseInfo.cgi"); |
|
264 | - } |
|
262 | + public function fetchLicenses () { |
|
263 | + return $this->get("XMLlicenseInfo.cgi"); |
|
264 | + } |
|
265 | 265 | |
266 | - public function fetchExpiredLicenses () { |
|
267 | - return $this->get("XMLlicenseInfo.cgi", array("expired" => '1')); |
|
268 | - } |
|
266 | + public function fetchExpiredLicenses () { |
|
267 | + return $this->get("XMLlicenseInfo.cgi", array("expired" => '1')); |
|
268 | + } |
|
269 | 269 | |
270 | - public function findKey ($search, $xml_obj) { |
|
271 | - $xml_obj = (array) $xml_obj; |
|
272 | - if (array_key_exists("packages", $xml_obj)) { |
|
273 | - $type = "packages"; |
|
274 | - } |
|
275 | - else if (array_key_exists("groups", $xml_obj)) { |
|
276 | - $type = "groups"; |
|
277 | - } |
|
278 | - else { |
|
279 | - error_log("cPanelLicensing::findKey with an object that is not groups or packages"); |
|
280 | - return; |
|
281 | - } |
|
282 | - foreach ((array) $xml_obj[$type] as $element) { |
|
283 | - foreach ((array) $element as $key => $value) { |
|
284 | - if ((string) $value == $search) { |
|
285 | - return (string)$key; |
|
286 | - } |
|
287 | - } |
|
288 | - } |
|
289 | - error_log("Could not find $type that matches $search"); |
|
290 | - } |
|
270 | + public function findKey ($search, $xml_obj) { |
|
271 | + $xml_obj = (array) $xml_obj; |
|
272 | + if (array_key_exists("packages", $xml_obj)) { |
|
273 | + $type = "packages"; |
|
274 | + } |
|
275 | + else if (array_key_exists("groups", $xml_obj)) { |
|
276 | + $type = "groups"; |
|
277 | + } |
|
278 | + else { |
|
279 | + error_log("cPanelLicensing::findKey with an object that is not groups or packages"); |
|
280 | + return; |
|
281 | + } |
|
282 | + foreach ((array) $xml_obj[$type] as $element) { |
|
283 | + foreach ((array) $element as $key => $value) { |
|
284 | + if ((string) $value == $search) { |
|
285 | + return (string)$key; |
|
286 | + } |
|
287 | + } |
|
288 | + } |
|
289 | + error_log("Could not find $type that matches $search"); |
|
290 | + } |
|
291 | 291 | } |
292 | 292 |
@@ -2,11 +2,11 @@ |
||
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"; |
@@ -7,14 +7,14 @@ |
||
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 |
@@ -4,12 +4,12 @@ |
||
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 | } |
@@ -9,15 +9,15 @@ |
||
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 |
@@ -3,7 +3,7 @@ |
||
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); |
@@ -2,7 +2,7 @@ |
||
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; |
@@ -7,9 +7,9 @@ |
||
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 |
@@ -4,10 +4,10 @@ |
||
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 |
@@ -8,10 +8,10 @@ |
||
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"; |
@@ -2,12 +2,12 @@ discard block |
||
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 |
||
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 | } |
@@ -10,19 +10,19 @@ |
||
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 |
@@ -4,10 +4,10 @@ |
||
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", |
@@ -8,15 +8,15 @@ |
||
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 |
@@ -4,253 +4,253 @@ |
||
4 | 4 | */ |
5 | 5 | class CpanelTest extends PHPUnit_Framework_TestCase |
6 | 6 | { |
7 | - /** |
|
8 | - * @var Cpanel |
|
9 | - */ |
|
10 | - protected $object; |
|
7 | + /** |
|
8 | + * @var Cpanel |
|
9 | + */ |
|
10 | + protected $object; |
|
11 | 11 | |
12 | - /** |
|
13 | - * Sets up the fixture, for example, opens a network connection. |
|
14 | - * This method is called before a test is executed. |
|
15 | - */ |
|
16 | - protected function setUp() |
|
17 | - { |
|
18 | - $this->object = new Cpanel; |
|
19 | - } |
|
12 | + /** |
|
13 | + * Sets up the fixture, for example, opens a network connection. |
|
14 | + * This method is called before a test is executed. |
|
15 | + */ |
|
16 | + protected function setUp() |
|
17 | + { |
|
18 | + $this->object = new Cpanel; |
|
19 | + } |
|
20 | 20 | |
21 | - /** |
|
22 | - * Tears down the fixture, for example, closes a network connection. |
|
23 | - * This method is called after a test is executed. |
|
24 | - */ |
|
25 | - protected function tearDown() |
|
26 | - { |
|
27 | - } |
|
21 | + /** |
|
22 | + * Tears down the fixture, for example, closes a network connection. |
|
23 | + * This method is called after a test is executed. |
|
24 | + */ |
|
25 | + protected function tearDown() |
|
26 | + { |
|
27 | + } |
|
28 | 28 | |
29 | - /** |
|
30 | - * @covers Detain\Cpanel\Cpanel::setopt |
|
31 | - * @todo Implement testSetopt(). |
|
32 | - */ |
|
33 | - public function testSetopt() |
|
34 | - { |
|
35 | - // Remove the following lines when you implement this test. |
|
36 | - $this->markTestIncomplete( |
|
37 | - 'This test has not been implemented yet.' |
|
38 | - ); |
|
39 | - } |
|
29 | + /** |
|
30 | + * @covers Detain\Cpanel\Cpanel::setopt |
|
31 | + * @todo Implement testSetopt(). |
|
32 | + */ |
|
33 | + public function testSetopt() |
|
34 | + { |
|
35 | + // Remove the following lines when you implement this test. |
|
36 | + $this->markTestIncomplete( |
|
37 | + 'This test has not been implemented yet.' |
|
38 | + ); |
|
39 | + } |
|
40 | 40 | |
41 | - /** |
|
42 | - * @covers Detain\Cpanel\Cpanel::setCredentials |
|
43 | - * @todo Implement testSetCredentials(). |
|
44 | - */ |
|
45 | - public function testSetCredentials() |
|
46 | - { |
|
47 | - // Remove the following lines when you implement this test. |
|
48 | - $this->markTestIncomplete( |
|
49 | - 'This test has not been implemented yet.' |
|
50 | - ); |
|
51 | - } |
|
41 | + /** |
|
42 | + * @covers Detain\Cpanel\Cpanel::setCredentials |
|
43 | + * @todo Implement testSetCredentials(). |
|
44 | + */ |
|
45 | + public function testSetCredentials() |
|
46 | + { |
|
47 | + // Remove the following lines when you implement this test. |
|
48 | + $this->markTestIncomplete( |
|
49 | + 'This test has not been implemented yet.' |
|
50 | + ); |
|
51 | + } |
|
52 | 52 | |
53 | - /** |
|
54 | - * @covers Detain\Cpanel\Cpanel::set_format |
|
55 | - * @todo Implement testSet_format(). |
|
56 | - */ |
|
57 | - public function testSet_format() |
|
58 | - { |
|
59 | - // Remove the following lines when you implement this test. |
|
60 | - $this->markTestIncomplete( |
|
61 | - 'This test has not been implemented yet.' |
|
62 | - ); |
|
63 | - } |
|
53 | + /** |
|
54 | + * @covers Detain\Cpanel\Cpanel::set_format |
|
55 | + * @todo Implement testSet_format(). |
|
56 | + */ |
|
57 | + public function testSet_format() |
|
58 | + { |
|
59 | + // Remove the following lines when you implement this test. |
|
60 | + $this->markTestIncomplete( |
|
61 | + 'This test has not been implemented yet.' |
|
62 | + ); |
|
63 | + } |
|
64 | 64 | |
65 | - /** |
|
66 | - * @covers Detain\Cpanel\Cpanel::reactivateLicense |
|
67 | - * @todo Implement testReactivateLicense(). |
|
68 | - */ |
|
69 | - public function testReactivateLicense() |
|
70 | - { |
|
71 | - // Remove the following lines when you implement this test. |
|
72 | - $this->markTestIncomplete( |
|
73 | - 'This test has not been implemented yet.' |
|
74 | - ); |
|
75 | - } |
|
65 | + /** |
|
66 | + * @covers Detain\Cpanel\Cpanel::reactivateLicense |
|
67 | + * @todo Implement testReactivateLicense(). |
|
68 | + */ |
|
69 | + public function testReactivateLicense() |
|
70 | + { |
|
71 | + // Remove the following lines when you implement this test. |
|
72 | + $this->markTestIncomplete( |
|
73 | + 'This test has not been implemented yet.' |
|
74 | + ); |
|
75 | + } |
|
76 | 76 | |
77 | - /** |
|
78 | - * @covers Detain\Cpanel\Cpanel::expireLicense |
|
79 | - * @todo Implement testExpireLicense(). |
|
80 | - */ |
|
81 | - public function testExpireLicense() |
|
82 | - { |
|
83 | - // Remove the following lines when you implement this test. |
|
84 | - $this->markTestIncomplete( |
|
85 | - 'This test has not been implemented yet.' |
|
86 | - ); |
|
87 | - } |
|
77 | + /** |
|
78 | + * @covers Detain\Cpanel\Cpanel::expireLicense |
|
79 | + * @todo Implement testExpireLicense(). |
|
80 | + */ |
|
81 | + public function testExpireLicense() |
|
82 | + { |
|
83 | + // Remove the following lines when you implement this test. |
|
84 | + $this->markTestIncomplete( |
|
85 | + 'This test has not been implemented yet.' |
|
86 | + ); |
|
87 | + } |
|
88 | 88 | |
89 | - /** |
|
90 | - * @covers Detain\Cpanel\Cpanel::extendOnetimeUpdates |
|
91 | - * @todo Implement testExtendOnetimeUpdates(). |
|
92 | - */ |
|
93 | - public function testExtendOnetimeUpdates() |
|
94 | - { |
|
95 | - // Remove the following lines when you implement this test. |
|
96 | - $this->markTestIncomplete( |
|
97 | - 'This test has not been implemented yet.' |
|
98 | - ); |
|
99 | - } |
|
89 | + /** |
|
90 | + * @covers Detain\Cpanel\Cpanel::extendOnetimeUpdates |
|
91 | + * @todo Implement testExtendOnetimeUpdates(). |
|
92 | + */ |
|
93 | + public function testExtendOnetimeUpdates() |
|
94 | + { |
|
95 | + // Remove the following lines when you implement this test. |
|
96 | + $this->markTestIncomplete( |
|
97 | + 'This test has not been implemented yet.' |
|
98 | + ); |
|
99 | + } |
|
100 | 100 | |
101 | - /** |
|
102 | - * @covers Detain\Cpanel\Cpanel::changeip |
|
103 | - * @todo Implement testChangeip(). |
|
104 | - */ |
|
105 | - public function testChangeip() |
|
106 | - { |
|
107 | - // Remove the following lines when you implement this test. |
|
108 | - $this->markTestIncomplete( |
|
109 | - 'This test has not been implemented yet.' |
|
110 | - ); |
|
111 | - } |
|
101 | + /** |
|
102 | + * @covers Detain\Cpanel\Cpanel::changeip |
|
103 | + * @todo Implement testChangeip(). |
|
104 | + */ |
|
105 | + public function testChangeip() |
|
106 | + { |
|
107 | + // Remove the following lines when you implement this test. |
|
108 | + $this->markTestIncomplete( |
|
109 | + 'This test has not been implemented yet.' |
|
110 | + ); |
|
111 | + } |
|
112 | 112 | |
113 | - /** |
|
114 | - * @covers Detain\Cpanel\Cpanel::requestTransfer |
|
115 | - * @todo Implement testRequestTransfer(). |
|
116 | - */ |
|
117 | - public function testRequestTransfer() |
|
118 | - { |
|
119 | - // Remove the following lines when you implement this test. |
|
120 | - $this->markTestIncomplete( |
|
121 | - 'This test has not been implemented yet.' |
|
122 | - ); |
|
123 | - } |
|
113 | + /** |
|
114 | + * @covers Detain\Cpanel\Cpanel::requestTransfer |
|
115 | + * @todo Implement testRequestTransfer(). |
|
116 | + */ |
|
117 | + public function testRequestTransfer() |
|
118 | + { |
|
119 | + // Remove the following lines when you implement this test. |
|
120 | + $this->markTestIncomplete( |
|
121 | + 'This test has not been implemented yet.' |
|
122 | + ); |
|
123 | + } |
|
124 | 124 | |
125 | - /** |
|
126 | - * @covers Detain\Cpanel\Cpanel::activateLicense |
|
127 | - * @todo Implement testActivateLicense(). |
|
128 | - */ |
|
129 | - public function testActivateLicense() |
|
130 | - { |
|
131 | - // Remove the following lines when you implement this test. |
|
132 | - $this->markTestIncomplete( |
|
133 | - 'This test has not been implemented yet.' |
|
134 | - ); |
|
135 | - } |
|
125 | + /** |
|
126 | + * @covers Detain\Cpanel\Cpanel::activateLicense |
|
127 | + * @todo Implement testActivateLicense(). |
|
128 | + */ |
|
129 | + public function testActivateLicense() |
|
130 | + { |
|
131 | + // Remove the following lines when you implement this test. |
|
132 | + $this->markTestIncomplete( |
|
133 | + 'This test has not been implemented yet.' |
|
134 | + ); |
|
135 | + } |
|
136 | 136 | |
137 | - /** |
|
138 | - * @covers Detain\Cpanel\Cpanel::addPickupPass |
|
139 | - * @todo Implement testAddPickupPass(). |
|
140 | - */ |
|
141 | - public function testAddPickupPass() |
|
142 | - { |
|
143 | - // Remove the following lines when you implement this test. |
|
144 | - $this->markTestIncomplete( |
|
145 | - 'This test has not been implemented yet.' |
|
146 | - ); |
|
147 | - } |
|
137 | + /** |
|
138 | + * @covers Detain\Cpanel\Cpanel::addPickupPass |
|
139 | + * @todo Implement testAddPickupPass(). |
|
140 | + */ |
|
141 | + public function testAddPickupPass() |
|
142 | + { |
|
143 | + // Remove the following lines when you implement this test. |
|
144 | + $this->markTestIncomplete( |
|
145 | + 'This test has not been implemented yet.' |
|
146 | + ); |
|
147 | + } |
|
148 | 148 | |
149 | - /** |
|
150 | - * @covers Detain\Cpanel\Cpanel::registerAuth |
|
151 | - * @todo Implement testRegisterAuth(). |
|
152 | - */ |
|
153 | - public function testRegisterAuth() |
|
154 | - { |
|
155 | - // Remove the following lines when you implement this test. |
|
156 | - $this->markTestIncomplete( |
|
157 | - 'This test has not been implemented yet.' |
|
158 | - ); |
|
159 | - } |
|
149 | + /** |
|
150 | + * @covers Detain\Cpanel\Cpanel::registerAuth |
|
151 | + * @todo Implement testRegisterAuth(). |
|
152 | + */ |
|
153 | + public function testRegisterAuth() |
|
154 | + { |
|
155 | + // Remove the following lines when you implement this test. |
|
156 | + $this->markTestIncomplete( |
|
157 | + 'This test has not been implemented yet.' |
|
158 | + ); |
|
159 | + } |
|
160 | 160 | |
161 | - /** |
|
162 | - * @covers Detain\Cpanel\Cpanel::fetchGroups |
|
163 | - * @todo Implement testFetchGroups(). |
|
164 | - */ |
|
165 | - public function testFetchGroups() |
|
166 | - { |
|
167 | - // Remove the following lines when you implement this test. |
|
168 | - $this->markTestIncomplete( |
|
169 | - 'This test has not been implemented yet.' |
|
170 | - ); |
|
171 | - } |
|
161 | + /** |
|
162 | + * @covers Detain\Cpanel\Cpanel::fetchGroups |
|
163 | + * @todo Implement testFetchGroups(). |
|
164 | + */ |
|
165 | + public function testFetchGroups() |
|
166 | + { |
|
167 | + // Remove the following lines when you implement this test. |
|
168 | + $this->markTestIncomplete( |
|
169 | + 'This test has not been implemented yet.' |
|
170 | + ); |
|
171 | + } |
|
172 | 172 | |
173 | - /** |
|
174 | - * @covers Detain\Cpanel\Cpanel::fetchLicenseRiskData |
|
175 | - * @todo Implement testFetchLicenseRiskData(). |
|
176 | - */ |
|
177 | - public function testFetchLicenseRiskData() |
|
178 | - { |
|
179 | - // Remove the following lines when you implement this test. |
|
180 | - $this->markTestIncomplete( |
|
181 | - 'This test has not been implemented yet.' |
|
182 | - ); |
|
183 | - } |
|
173 | + /** |
|
174 | + * @covers Detain\Cpanel\Cpanel::fetchLicenseRiskData |
|
175 | + * @todo Implement testFetchLicenseRiskData(). |
|
176 | + */ |
|
177 | + public function testFetchLicenseRiskData() |
|
178 | + { |
|
179 | + // Remove the following lines when you implement this test. |
|
180 | + $this->markTestIncomplete( |
|
181 | + 'This test has not been implemented yet.' |
|
182 | + ); |
|
183 | + } |
|
184 | 184 | |
185 | - /** |
|
186 | - * @covers Detain\Cpanel\Cpanel::fetchLicenseRaw |
|
187 | - * @todo Implement testFetchLicenseRaw(). |
|
188 | - */ |
|
189 | - public function testFetchLicenseRaw() |
|
190 | - { |
|
191 | - // Remove the following lines when you implement this test. |
|
192 | - $this->markTestIncomplete( |
|
193 | - 'This test has not been implemented yet.' |
|
194 | - ); |
|
195 | - } |
|
185 | + /** |
|
186 | + * @covers Detain\Cpanel\Cpanel::fetchLicenseRaw |
|
187 | + * @todo Implement testFetchLicenseRaw(). |
|
188 | + */ |
|
189 | + public function testFetchLicenseRaw() |
|
190 | + { |
|
191 | + // Remove the following lines when you implement this test. |
|
192 | + $this->markTestIncomplete( |
|
193 | + 'This test has not been implemented yet.' |
|
194 | + ); |
|
195 | + } |
|
196 | 196 | |
197 | - /** |
|
198 | - * @covers Detain\Cpanel\Cpanel::fetchLicenseId |
|
199 | - * @todo Implement testFetchLicenseId(). |
|
200 | - */ |
|
201 | - public function testFetchLicenseId() |
|
202 | - { |
|
203 | - // Remove the following lines when you implement this test. |
|
204 | - $this->markTestIncomplete( |
|
205 | - 'This test has not been implemented yet.' |
|
206 | - ); |
|
207 | - } |
|
197 | + /** |
|
198 | + * @covers Detain\Cpanel\Cpanel::fetchLicenseId |
|
199 | + * @todo Implement testFetchLicenseId(). |
|
200 | + */ |
|
201 | + public function testFetchLicenseId() |
|
202 | + { |
|
203 | + // Remove the following lines when you implement this test. |
|
204 | + $this->markTestIncomplete( |
|
205 | + 'This test has not been implemented yet.' |
|
206 | + ); |
|
207 | + } |
|
208 | 208 | |
209 | - /** |
|
210 | - * @covers Detain\Cpanel\Cpanel::fetchPackages |
|
211 | - * @todo Implement testFetchPackages(). |
|
212 | - */ |
|
213 | - public function testFetchPackages() |
|
214 | - { |
|
215 | - // Remove the following lines when you implement this test. |
|
216 | - $this->markTestIncomplete( |
|
217 | - 'This test has not been implemented yet.' |
|
218 | - ); |
|
219 | - } |
|
209 | + /** |
|
210 | + * @covers Detain\Cpanel\Cpanel::fetchPackages |
|
211 | + * @todo Implement testFetchPackages(). |
|
212 | + */ |
|
213 | + public function testFetchPackages() |
|
214 | + { |
|
215 | + // Remove the following lines when you implement this test. |
|
216 | + $this->markTestIncomplete( |
|
217 | + 'This test has not been implemented yet.' |
|
218 | + ); |
|
219 | + } |
|
220 | 220 | |
221 | - /** |
|
222 | - * @covers Detain\Cpanel\Cpanel::fetchLicenses |
|
223 | - * @todo Implement testFetchLicenses(). |
|
224 | - */ |
|
225 | - public function testFetchLicenses() |
|
226 | - { |
|
227 | - // Remove the following lines when you implement this test. |
|
228 | - $this->markTestIncomplete( |
|
229 | - 'This test has not been implemented yet.' |
|
230 | - ); |
|
231 | - } |
|
221 | + /** |
|
222 | + * @covers Detain\Cpanel\Cpanel::fetchLicenses |
|
223 | + * @todo Implement testFetchLicenses(). |
|
224 | + */ |
|
225 | + public function testFetchLicenses() |
|
226 | + { |
|
227 | + // Remove the following lines when you implement this test. |
|
228 | + $this->markTestIncomplete( |
|
229 | + 'This test has not been implemented yet.' |
|
230 | + ); |
|
231 | + } |
|
232 | 232 | |
233 | - /** |
|
234 | - * @covers Detain\Cpanel\Cpanel::fetchExpiredLicenses |
|
235 | - * @todo Implement testFetchExpiredLicenses(). |
|
236 | - */ |
|
237 | - public function testFetchExpiredLicenses() |
|
238 | - { |
|
239 | - // Remove the following lines when you implement this test. |
|
240 | - $this->markTestIncomplete( |
|
241 | - 'This test has not been implemented yet.' |
|
242 | - ); |
|
243 | - } |
|
233 | + /** |
|
234 | + * @covers Detain\Cpanel\Cpanel::fetchExpiredLicenses |
|
235 | + * @todo Implement testFetchExpiredLicenses(). |
|
236 | + */ |
|
237 | + public function testFetchExpiredLicenses() |
|
238 | + { |
|
239 | + // Remove the following lines when you implement this test. |
|
240 | + $this->markTestIncomplete( |
|
241 | + 'This test has not been implemented yet.' |
|
242 | + ); |
|
243 | + } |
|
244 | 244 | |
245 | - /** |
|
246 | - * @covers Detain\Cpanel\Cpanel::findKey |
|
247 | - * @todo Implement testFindKey(). |
|
248 | - */ |
|
249 | - public function testFindKey() |
|
250 | - { |
|
251 | - // Remove the following lines when you implement this test. |
|
252 | - $this->markTestIncomplete( |
|
253 | - 'This test has not been implemented yet.' |
|
254 | - ); |
|
255 | - } |
|
245 | + /** |
|
246 | + * @covers Detain\Cpanel\Cpanel::findKey |
|
247 | + * @todo Implement testFindKey(). |
|
248 | + */ |
|
249 | + public function testFindKey() |
|
250 | + { |
|
251 | + // Remove the following lines when you implement this test. |
|
252 | + $this->markTestIncomplete( |
|
253 | + 'This test has not been implemented yet.' |
|
254 | + ); |
|
255 | + } |
|
256 | 256 | } |
@@ -2,8 +2,7 @@ discard block |
||
2 | 2 | /** |
3 | 3 | * Generated by PHPUnit_SkeletonGenerator on 2017-06-16 at 14:19:40. |
4 | 4 | */ |
5 | -class CpanelTest extends PHPUnit_Framework_TestCase |
|
6 | -{ |
|
5 | +class CpanelTest extends PHPUnit_Framework_TestCase { |
|
7 | 6 | /** |
8 | 7 | * @var Cpanel |
9 | 8 | */ |
@@ -13,8 +12,7 @@ discard block |
||
13 | 12 | * Sets up the fixture, for example, opens a network connection. |
14 | 13 | * This method is called before a test is executed. |
15 | 14 | */ |
16 | - protected function setUp() |
|
17 | - { |
|
15 | + protected function setUp() { |
|
18 | 16 | $this->object = new Cpanel; |
19 | 17 | } |
20 | 18 | |
@@ -22,16 +20,14 @@ discard block |
||
22 | 20 | * Tears down the fixture, for example, closes a network connection. |
23 | 21 | * This method is called after a test is executed. |
24 | 22 | */ |
25 | - protected function tearDown() |
|
26 | - { |
|
23 | + protected function tearDown() { |
|
27 | 24 | } |
28 | 25 | |
29 | 26 | /** |
30 | 27 | * @covers Detain\Cpanel\Cpanel::setopt |
31 | 28 | * @todo Implement testSetopt(). |
32 | 29 | */ |
33 | - public function testSetopt() |
|
34 | - { |
|
30 | + public function testSetopt() { |
|
35 | 31 | // Remove the following lines when you implement this test. |
36 | 32 | $this->markTestIncomplete( |
37 | 33 | 'This test has not been implemented yet.' |
@@ -42,8 +38,7 @@ discard block |
||
42 | 38 | * @covers Detain\Cpanel\Cpanel::setCredentials |
43 | 39 | * @todo Implement testSetCredentials(). |
44 | 40 | */ |
45 | - public function testSetCredentials() |
|
46 | - { |
|
41 | + public function testSetCredentials() { |
|
47 | 42 | // Remove the following lines when you implement this test. |
48 | 43 | $this->markTestIncomplete( |
49 | 44 | 'This test has not been implemented yet.' |
@@ -54,8 +49,7 @@ discard block |
||
54 | 49 | * @covers Detain\Cpanel\Cpanel::set_format |
55 | 50 | * @todo Implement testSet_format(). |
56 | 51 | */ |
57 | - public function testSet_format() |
|
58 | - { |
|
52 | + public function testSet_format() { |
|
59 | 53 | // Remove the following lines when you implement this test. |
60 | 54 | $this->markTestIncomplete( |
61 | 55 | 'This test has not been implemented yet.' |
@@ -66,8 +60,7 @@ discard block |
||
66 | 60 | * @covers Detain\Cpanel\Cpanel::reactivateLicense |
67 | 61 | * @todo Implement testReactivateLicense(). |
68 | 62 | */ |
69 | - public function testReactivateLicense() |
|
70 | - { |
|
63 | + public function testReactivateLicense() { |
|
71 | 64 | // Remove the following lines when you implement this test. |
72 | 65 | $this->markTestIncomplete( |
73 | 66 | 'This test has not been implemented yet.' |
@@ -78,8 +71,7 @@ discard block |
||
78 | 71 | * @covers Detain\Cpanel\Cpanel::expireLicense |
79 | 72 | * @todo Implement testExpireLicense(). |
80 | 73 | */ |
81 | - public function testExpireLicense() |
|
82 | - { |
|
74 | + public function testExpireLicense() { |
|
83 | 75 | // Remove the following lines when you implement this test. |
84 | 76 | $this->markTestIncomplete( |
85 | 77 | 'This test has not been implemented yet.' |
@@ -90,8 +82,7 @@ discard block |
||
90 | 82 | * @covers Detain\Cpanel\Cpanel::extendOnetimeUpdates |
91 | 83 | * @todo Implement testExtendOnetimeUpdates(). |
92 | 84 | */ |
93 | - public function testExtendOnetimeUpdates() |
|
94 | - { |
|
85 | + public function testExtendOnetimeUpdates() { |
|
95 | 86 | // Remove the following lines when you implement this test. |
96 | 87 | $this->markTestIncomplete( |
97 | 88 | 'This test has not been implemented yet.' |
@@ -102,8 +93,7 @@ discard block |
||
102 | 93 | * @covers Detain\Cpanel\Cpanel::changeip |
103 | 94 | * @todo Implement testChangeip(). |
104 | 95 | */ |
105 | - public function testChangeip() |
|
106 | - { |
|
96 | + public function testChangeip() { |
|
107 | 97 | // Remove the following lines when you implement this test. |
108 | 98 | $this->markTestIncomplete( |
109 | 99 | 'This test has not been implemented yet.' |
@@ -114,8 +104,7 @@ discard block |
||
114 | 104 | * @covers Detain\Cpanel\Cpanel::requestTransfer |
115 | 105 | * @todo Implement testRequestTransfer(). |
116 | 106 | */ |
117 | - public function testRequestTransfer() |
|
118 | - { |
|
107 | + public function testRequestTransfer() { |
|
119 | 108 | // Remove the following lines when you implement this test. |
120 | 109 | $this->markTestIncomplete( |
121 | 110 | 'This test has not been implemented yet.' |
@@ -126,8 +115,7 @@ discard block |
||
126 | 115 | * @covers Detain\Cpanel\Cpanel::activateLicense |
127 | 116 | * @todo Implement testActivateLicense(). |
128 | 117 | */ |
129 | - public function testActivateLicense() |
|
130 | - { |
|
118 | + public function testActivateLicense() { |
|
131 | 119 | // Remove the following lines when you implement this test. |
132 | 120 | $this->markTestIncomplete( |
133 | 121 | 'This test has not been implemented yet.' |
@@ -138,8 +126,7 @@ discard block |
||
138 | 126 | * @covers Detain\Cpanel\Cpanel::addPickupPass |
139 | 127 | * @todo Implement testAddPickupPass(). |
140 | 128 | */ |
141 | - public function testAddPickupPass() |
|
142 | - { |
|
129 | + public function testAddPickupPass() { |
|
143 | 130 | // Remove the following lines when you implement this test. |
144 | 131 | $this->markTestIncomplete( |
145 | 132 | 'This test has not been implemented yet.' |
@@ -150,8 +137,7 @@ discard block |
||
150 | 137 | * @covers Detain\Cpanel\Cpanel::registerAuth |
151 | 138 | * @todo Implement testRegisterAuth(). |
152 | 139 | */ |
153 | - public function testRegisterAuth() |
|
154 | - { |
|
140 | + public function testRegisterAuth() { |
|
155 | 141 | // Remove the following lines when you implement this test. |
156 | 142 | $this->markTestIncomplete( |
157 | 143 | 'This test has not been implemented yet.' |
@@ -162,8 +148,7 @@ discard block |
||
162 | 148 | * @covers Detain\Cpanel\Cpanel::fetchGroups |
163 | 149 | * @todo Implement testFetchGroups(). |
164 | 150 | */ |
165 | - public function testFetchGroups() |
|
166 | - { |
|
151 | + public function testFetchGroups() { |
|
167 | 152 | // Remove the following lines when you implement this test. |
168 | 153 | $this->markTestIncomplete( |
169 | 154 | 'This test has not been implemented yet.' |
@@ -174,8 +159,7 @@ discard block |
||
174 | 159 | * @covers Detain\Cpanel\Cpanel::fetchLicenseRiskData |
175 | 160 | * @todo Implement testFetchLicenseRiskData(). |
176 | 161 | */ |
177 | - public function testFetchLicenseRiskData() |
|
178 | - { |
|
162 | + public function testFetchLicenseRiskData() { |
|
179 | 163 | // Remove the following lines when you implement this test. |
180 | 164 | $this->markTestIncomplete( |
181 | 165 | 'This test has not been implemented yet.' |
@@ -186,8 +170,7 @@ discard block |
||
186 | 170 | * @covers Detain\Cpanel\Cpanel::fetchLicenseRaw |
187 | 171 | * @todo Implement testFetchLicenseRaw(). |
188 | 172 | */ |
189 | - public function testFetchLicenseRaw() |
|
190 | - { |
|
173 | + public function testFetchLicenseRaw() { |
|
191 | 174 | // Remove the following lines when you implement this test. |
192 | 175 | $this->markTestIncomplete( |
193 | 176 | 'This test has not been implemented yet.' |
@@ -198,8 +181,7 @@ discard block |
||
198 | 181 | * @covers Detain\Cpanel\Cpanel::fetchLicenseId |
199 | 182 | * @todo Implement testFetchLicenseId(). |
200 | 183 | */ |
201 | - public function testFetchLicenseId() |
|
202 | - { |
|
184 | + public function testFetchLicenseId() { |
|
203 | 185 | // Remove the following lines when you implement this test. |
204 | 186 | $this->markTestIncomplete( |
205 | 187 | 'This test has not been implemented yet.' |
@@ -210,8 +192,7 @@ discard block |
||
210 | 192 | * @covers Detain\Cpanel\Cpanel::fetchPackages |
211 | 193 | * @todo Implement testFetchPackages(). |
212 | 194 | */ |
213 | - public function testFetchPackages() |
|
214 | - { |
|
195 | + public function testFetchPackages() { |
|
215 | 196 | // Remove the following lines when you implement this test. |
216 | 197 | $this->markTestIncomplete( |
217 | 198 | 'This test has not been implemented yet.' |
@@ -222,8 +203,7 @@ discard block |
||
222 | 203 | * @covers Detain\Cpanel\Cpanel::fetchLicenses |
223 | 204 | * @todo Implement testFetchLicenses(). |
224 | 205 | */ |
225 | - public function testFetchLicenses() |
|
226 | - { |
|
206 | + public function testFetchLicenses() { |
|
227 | 207 | // Remove the following lines when you implement this test. |
228 | 208 | $this->markTestIncomplete( |
229 | 209 | 'This test has not been implemented yet.' |
@@ -234,8 +214,7 @@ discard block |
||
234 | 214 | * @covers Detain\Cpanel\Cpanel::fetchExpiredLicenses |
235 | 215 | * @todo Implement testFetchExpiredLicenses(). |
236 | 216 | */ |
237 | - public function testFetchExpiredLicenses() |
|
238 | - { |
|
217 | + public function testFetchExpiredLicenses() { |
|
239 | 218 | // Remove the following lines when you implement this test. |
240 | 219 | $this->markTestIncomplete( |
241 | 220 | 'This test has not been implemented yet.' |
@@ -246,8 +225,7 @@ discard block |
||
246 | 225 | * @covers Detain\Cpanel\Cpanel::findKey |
247 | 226 | * @todo Implement testFindKey(). |
248 | 227 | */ |
249 | - public function testFindKey() |
|
250 | - { |
|
228 | + public function testFindKey() { |
|
251 | 229 | // Remove the following lines when you implement this test. |
252 | 230 | $this->markTestIncomplete( |
253 | 231 | 'This test has not been implemented yet.' |