@@ -380,17 +380,17 @@ discard block |
||
380 | 380 | $params = ['domain' => $domain]; |
381 | 381 | |
382 | 382 | $result = $this->client->sendRequest("/json-api/domainuserdata", "GET", $params); |
383 | - if(empty($result)){ |
|
383 | + if (empty($result)) { |
|
384 | 384 | return null; |
385 | 385 | } |
386 | 386 | |
387 | - if($result['result'][0]['status'] === 0){ |
|
387 | + if ($result['result'][0]['status'] === 0) { |
|
388 | 388 | throw new ClientExceptions($result['result'][0]['statusmsg']); |
389 | 389 | } |
390 | 390 | |
391 | 391 | $userData = $result['userdata']; |
392 | 392 | $domainUser = new DomainUser(); |
393 | - $domainUser->setHasCGI((bool) $userData['hascgi']); |
|
393 | + $domainUser->setHasCGI((bool)$userData['hascgi']); |
|
394 | 394 | $domainUser->setServerName($userData['servername']); |
395 | 395 | $domainUser->setOwner($userData['owner']); |
396 | 396 | $domainUser->setScriptAlias($userData['scriptalias']); |
@@ -400,11 +400,11 @@ discard block |
||
400 | 400 | $domainUser->setGroup($userData['group']); |
401 | 401 | $domainUser->setIpAddress($userData['ip']); |
402 | 402 | $domainUser->setPort($userData['port']); |
403 | - $domainUser->setPhpOpenBaseDirectoryProtect((bool) $userData['phpopenbasedirprotect']); |
|
403 | + $domainUser->setPhpOpenBaseDirectoryProtect((bool)$userData['phpopenbasedirprotect']); |
|
404 | 404 | |
405 | - if($userData['usecanonicalname'] === "Off"){ |
|
405 | + if ($userData['usecanonicalname'] === "Off") { |
|
406 | 406 | $domainUser->setUseCanonicalName(false); |
407 | - }elseif($userData['usecanonicalname'] === "On"){ |
|
407 | + }elseif ($userData['usecanonicalname'] === "On") { |
|
408 | 408 | $domainUser->setUseCanonicalName(true); |
409 | 409 | } |
410 | 410 | |
@@ -454,18 +454,18 @@ discard block |
||
454 | 454 | ]; |
455 | 455 | |
456 | 456 | $usersJson = []; |
457 | - foreach ($usernames as $username){ |
|
457 | + foreach ($usernames as $username) { |
|
458 | 458 | $usersJson[$username] = 1; |
459 | 459 | } |
460 | 460 | |
461 | 461 | $params['users_json'] = json_encode($usersJson); |
462 | 462 | |
463 | 463 | $result = $this->client->sendRequest("/json-api/forcepasswordchange", "GET", $params); |
464 | - if($result['metadata']['result'] === 0){ |
|
464 | + if ($result['metadata']['result'] === 0) { |
|
465 | 465 | throw new ClientExceptions($result['metadata']['reason']); |
466 | 466 | } |
467 | 467 | |
468 | - if(!empty($result['data'])){ |
|
468 | + if (!empty($result['data'])) { |
|
469 | 469 | return $result['updated']; |
470 | 470 | } |
471 | 471 | |
@@ -487,15 +487,15 @@ discard block |
||
487 | 487 | $params = []; |
488 | 488 | $result = $this->client->sendRequest("/json-api/get_domain_info", "GET", $params); |
489 | 489 | |
490 | - if(empty($result)){ |
|
490 | + if (empty($result)) { |
|
491 | 491 | return null; |
492 | 492 | } |
493 | 493 | |
494 | - if(!empty($result['metadata']) && $result['metadata']['result'] === 1){ |
|
494 | + if (!empty($result['metadata']) && $result['metadata']['result'] === 1) { |
|
495 | 495 | $domains = $result['data']['domains']; |
496 | 496 | |
497 | 497 | $domainList = []; |
498 | - foreach ($domains as $domain){ |
|
498 | + foreach ($domains as $domain) { |
|
499 | 499 | $do = new Domain(); |
500 | 500 | $do->setPort(intval($domain['port'])); |
501 | 501 | $do->setUser($domain['user']); |
@@ -506,9 +506,9 @@ discard block |
||
506 | 506 | $do->setPhpVersion($domain['php_version']); |
507 | 507 | $do->setUserOwner($domain['user_owner']); |
508 | 508 | $do->setDomainType($domain['domain_type']); |
509 | - $do->setIpv6IsDedicated((bool) $domain['ipv6_is_dedicated']); |
|
509 | + $do->setIpv6IsDedicated((bool)$domain['ipv6_is_dedicated']); |
|
510 | 510 | $do->setIpv4($domain['ipv4']); |
511 | - $do->setModSecurityEnabled((bool) $domain['modsecurity_enabled']); |
|
511 | + $do->setModSecurityEnabled((bool)$domain['modsecurity_enabled']); |
|
512 | 512 | $do->setDocRoot($domain['docroot']); |
513 | 513 | $domainList[] = $do; |
514 | 514 | } |