Test Failed
Push — master ( f8fe91...e2870e )
by Joe
04:30
created
src/Cpanel.php 1 patch
Indentation   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@  discard block
 block discarded – undo
14 14
 	public $opts;
15 15
 
16 16
 	/**
17
-	* Cpanel constructor.
18
-	*
19
-	* @param $user
20
-	* @param $pass
21
-	*/
17
+	 * Cpanel constructor.
18
+	 *
19
+	 * @param $user
20
+	 * @param $pass
21
+	 */
22 22
 	public function __construct($user, $pass)
23 23
 	{
24 24
 		$this->opts = [];
@@ -29,29 +29,29 @@  discard block
 block discarded – undo
29 29
 	}
30 30
 
31 31
 	/**
32
-	* @param $option
33
-	* @param $value
34
-	*/
32
+	 * @param $option
33
+	 * @param $value
34
+	 */
35 35
 	public function setopt($option, $value)
36 36
 	{
37 37
 		$this->opts[$option] = $value;
38 38
 	}
39 39
 
40 40
 	/**
41
-	* sets the login credentials
42
-	* @param string $user the username
43
-	* @param string $pass the password
44
-	*/
41
+	 * sets the login credentials
42
+	 * @param string $user the username
43
+	 * @param string $pass the password
44
+	 */
45 45
 	public function setCredentials($user, $pass)
46 46
 	{
47 47
 		$this->setopt(CURLOPT_USERPWD, $user.':'.$pass);
48 48
 	}
49 49
 
50 50
 	/**
51
-	* sets the output format
52
-	*
53
-	* @param string $format can be any of xml,json,yaml,simplexml
54
-	*/
51
+	 * sets the output format
52
+	 *
53
+	 * @param string $format can be any of xml,json,yaml,simplexml
54
+	 */
55 55
 	public function setFormat($format)
56 56
 	{
57 57
 		if ($format != 'xml' && $format != 'json' && $format != 'yaml' && $format != 'simplexml') {
@@ -63,10 +63,10 @@  discard block
 block discarded – undo
63 63
 	}
64 64
 
65 65
 	/**
66
-	* @param string $function
67
-	* @param array $args
68
-	* @return array|mixed|void
69
-	*/
66
+	 * @param string $function
67
+	 * @param array $args
68
+	 * @return array|mixed|void
69
+	 */
70 70
 	private function get($function, $args = [])
71 71
 	{
72 72
 		if (!$function) {
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
 	}
104 104
 
105 105
 	/**
106
-	* formats the response
107
-	* @param array $result the result array to format
108
-	* @return array the rormatted arrray
109
-	*/
106
+	 * formats the response
107
+	 * @param array $result the result array to format
108
+	 * @return array the rormatted arrray
109
+	 */
110 110
 	private function formatResult($result)
111 111
 	{
112 112
 		if (is_array($result)) {
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
 	}
125 125
 
126 126
 	/**
127
-	* @param $id
128
-	* @return int
129
-	*/
127
+	 * @param $id
128
+	 * @return int
129
+	 */
130 130
 	private function validateID($id)
131 131
 	{
132 132
 		if (preg_match("/^(L|P|G)?\d*$/", $id)) {
@@ -137,18 +137,18 @@  discard block
 block discarded – undo
137 137
 	}
138 138
 
139 139
 	/**
140
-	* @param $ipAddress
141
-	* @return int
142
-	*/
140
+	 * @param $ipAddress
141
+	 * @return int
142
+	 */
143 143
 	private function validateIP($ipAddress)
144 144
 	{
145 145
 		return preg_match("/^\d*\.\d*\.\d*\.\d*$/", $ipAddress);
146 146
 	}
147 147
 
148 148
 	/**
149
-	* @param $args
150
-	* @return array|mixed|void
151
-	*/
149
+	 * @param $args
150
+	 * @return array|mixed|void
151
+	 */
152 152
 	public function reactivateLicense($args)
153 153
 	{
154 154
 		if (!array_key_exists('liscid', $args)) {
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
 	}
164 164
 
165 165
 	/**
166
-	* @param $args
167
-	* @return array|mixed|void
168
-	*/
166
+	 * @param $args
167
+	 * @return array|mixed|void
168
+	 */
169 169
 	public function expireLicense($args)
170 170
 	{
171 171
 		if (!array_key_exists('liscid', $args)) {
@@ -180,9 +180,9 @@  discard block
 block discarded – undo
180 180
 	}
181 181
 
182 182
 	/**
183
-	* @param $args
184
-	* @return array|mixed|void
185
-	*/
183
+	 * @param $args
184
+	 * @return array|mixed|void
185
+	 */
186 186
 	public function extendOnetimeUpdates($args)
187 187
 	{
188 188
 		if (!array_key_exists('ip', $args)) {
@@ -197,9 +197,9 @@  discard block
 block discarded – undo
197 197
 	}
198 198
 
199 199
 	/**
200
-	* @param $args
201
-	* @return array|mixed|void
202
-	*/
200
+	 * @param $args
201
+	 * @return array|mixed|void
202
+	 */
203 203
 	public function changeip($args)
204 204
 	{
205 205
 		if (!array_key_exists('oldip', $args) || !array_key_exists('newip', $args)) {
@@ -214,9 +214,9 @@  discard block
 block discarded – undo
214 214
 	}
215 215
 
216 216
 	/**
217
-	* @param $args
218
-	* @return array|mixed|void
219
-	*/
217
+	 * @param $args
218
+	 * @return array|mixed|void
219
+	 */
220 220
 	public function requestTransfer($args)
221 221
 	{
222 222
 		if (!array_key_exists('ip', $args) || !array_key_exists('groupid', $args) || !array_key_exists('packagegroup', $args)) {
@@ -239,9 +239,9 @@  discard block
 block discarded – undo
239 239
 	}
240 240
 
241 241
 	/**
242
-	* @param $args
243
-	* @return array|mixed|void
244
-	*/
242
+	 * @param $args
243
+	 * @return array|mixed|void
244
+	 */
245 245
 	public function activateLicense($args)
246 246
 	{
247 247
 		if (!array_key_exists('ip', $args) || !array_key_exists('groupid', $args) || !array_key_exists('packageid', $args)) {
@@ -265,9 +265,9 @@  discard block
 block discarded – undo
265 265
 	}
266 266
 
267 267
 	/**
268
-	* @param $args
269
-	* @return array|mixed|void
270
-	*/
268
+	 * @param $args
269
+	 * @return array|mixed|void
270
+	 */
271 271
 	public function addPickupPass($args)
272 272
 	{
273 273
 		if (!array_key_exists('pickup', $args)) {
@@ -278,9 +278,9 @@  discard block
 block discarded – undo
278 278
 	}
279 279
 
280 280
 	/**
281
-	* @param $args
282
-	* @return array|mixed|void
283
-	*/
281
+	 * @param $args
282
+	 * @return array|mixed|void
283
+	 */
284 284
 	public function registerAuth($args)
285 285
 	{
286 286
 		if (!array_key_exists('user', $args)) {
@@ -303,21 +303,21 @@  discard block
 block discarded – undo
303 303
 	}
304 304
 
305 305
 	/**
306
-	* return s a list of groups
307
-	*
308
-	* @return array|mixed|void
309
-	*/
306
+	 * return s a list of groups
307
+	 *
308
+	 * @return array|mixed|void
309
+	 */
310 310
 	public function fetchGroups()
311 311
 	{
312 312
 		return $this->get('XMLgroupInfo.cgi');
313 313
 	}
314 314
 
315 315
 	/**
316
-	* fetches license risk data
317
-	*
318
-	* @param array $args
319
-	* @return array|mixed|void
320
-	*/
316
+	 * fetches license risk data
317
+	 *
318
+	 * @param array $args
319
+	 * @return array|mixed|void
320
+	 */
321 321
 	public function fetchLicenseRiskData($args = [])
322 322
 	{
323 323
 		if (!array_key_exists('ip', $args)) {
@@ -332,11 +332,11 @@  discard block
 block discarded – undo
332 332
 	}
333 333
 
334 334
 	/**
335
-	* gets raw license information
336
-	*
337
-	* @param array $args optional array of arguments
338
-	* @return array|mixed|void
339
-	*/
335
+	 * gets raw license information
336
+	 *
337
+	 * @param array $args optional array of arguments
338
+	 * @return array|mixed|void
339
+	 */
340 340
 	public function fetchLicenseRaw($args = [])
341 341
 	{
342 342
 		$args = array_merge(['all' => 1], $args);
@@ -352,11 +352,11 @@  discard block
 block discarded – undo
352 352
 	}
353 353
 
354 354
 	/**
355
-	* gets license information
356
-	*
357
-	* @param array $args optional array of arguments
358
-	* @return array|mixed|void
359
-	*/
355
+	 * gets license information
356
+	 *
357
+	 * @param array $args optional array of arguments
358
+	 * @return array|mixed|void
359
+	 */
360 360
 	public function fetchLicenseId($args = [])
361 361
 	{
362 362
 		$args = array_merge(['all' => 1], $args);
@@ -372,38 +372,38 @@  discard block
 block discarded – undo
372 372
 	}
373 373
 
374 374
 	/**
375
-	* @return array|mixed|void
376
-	*/
375
+	 * @return array|mixed|void
376
+	 */
377 377
 	public function fetchPackages()
378 378
 	{
379 379
 		return $this->get('XMLpackageInfo.cgi');
380 380
 	}
381 381
 
382 382
 	/**
383
-	* gets a list of licenses
384
-	*
385
-	* @param array $args optional arguments
386
-	* @return array|mixed|void
387
-	*/
383
+	 * gets a list of licenses
384
+	 *
385
+	 * @param array $args optional arguments
386
+	 * @return array|mixed|void
387
+	 */
388 388
 	public function fetchLicenses($args = [])
389 389
 	{
390 390
 		return $this->get('XMLlicenseInfo.cgi');
391 391
 	}
392 392
 
393 393
 	/**
394
-	* return sa list of expired licenses
395
-	* @return array|mixed|void
396
-	*/
394
+	 * return sa list of expired licenses
395
+	 * @return array|mixed|void
396
+	 */
397 397
 	public function fetchExpiredLicenses()
398 398
 	{
399 399
 		return $this->fetchLicenses(['expired' => '1']);
400 400
 	}
401 401
 
402 402
 	/**
403
-	* @param $search
404
-	* @param $xmlObj
405
-	* @return string|void
406
-	*/
403
+	 * @param $search
404
+	 * @param $xmlObj
405
+	 * @return string|void
406
+	 */
407 407
 	public function findKey($search, $xmlObj)
408 408
 	{
409 409
 		$xmlObj = (array) $xmlObj;
Please login to merge, or discard this patch.