@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | * status -> Error, msj -> Account already exists. |
28 | 28 | */ |
29 | 29 | public function createAccount(string $domain, string $user, string $pass, string $email, string $server_ips, |
30 | - string $package = 'default', int $inode = 0, int $limit_nproc = 40, int $limit_nofile = 150, |
|
31 | - bool $autossl = false, bool $encodepass = false, $reseller = null) |
|
30 | + string $package = 'default', int $inode = 0, int $limit_nproc = 40, int $limit_nofile = 150, |
|
31 | + bool $autossl = false, bool $encodepass = false, $reseller = null) |
|
32 | 32 | { |
33 | 33 | $autossl = intval($autossl); |
34 | 34 | $this->data = compact('domain', 'user', 'pass', 'email', 'package', 'inode', |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * status -> Error, msj -> User is root |
59 | 59 | */ |
60 | 60 | public function updateAccount(string $user, string $email, string $server_ips, string $package = 'default', |
61 | - string $backup = 'on', int $inode = 0, int $processes = 40, int $openfiles = 150) |
|
61 | + string $backup = 'on', int $inode = 0, int $processes = 40, int $openfiles = 150) |
|
62 | 62 | { |
63 | 63 | $this->data = compact('user', 'email', 'server_ips', 'package', 'backup', 'inode', 'processes', 'openfiles'); |
64 | 64 | $this->data['debug'] = $this->debug; |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * status -> Error, msj -> Name already exists |
31 | 31 | */ |
32 | 32 | public function createPackage(string $package_name, int $disk_quota, int $bandwidth, int $ftp_accounts, int $email_accounts, int $email_lists, |
33 | - int $databases, int $sub_domains, int $parked_domains, int $addons_domains, int $hourly_emails, int $reseller, int $accounts) |
|
33 | + int $databases, int $sub_domains, int $parked_domains, int $addons_domains, int $hourly_emails, int $reseller, int $accounts) |
|
34 | 34 | { |
35 | 35 | $this->data = compact('package_name', 'disk_quota', 'bandwidth', 'ftp_accounts', 'quotamail', 'email_accounts', 'email_lists', |
36 | 36 | 'databases', 'sub_domains', 'parked_domains', 'addons_domains', 'hourly_emails', 'reseller', 'accounts'); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * status => Error, msj => There is no package with this name |
59 | 59 | */ |
60 | 60 | public function updatePackage(string $package_name, int $disk_quota, int $bandwidth, int $ftp_accounts, int $email_accounts, int $email_lists, |
61 | - int $databases, int $sub_domains, int $parked_domains, int $addons_domains, int $hourly_emails) |
|
61 | + int $databases, int $sub_domains, int $parked_domains, int $addons_domains, int $hourly_emails) |
|
62 | 62 | { |
63 | 63 | $this->data = compact('package_name', 'disk_quota', 'bandwidth', 'ftp_accounts', 'quotamail', 'email_accounts', |
64 | 64 | 'email_lists', 'databases', 'sub_domains', 'parked_domains', 'addons_domains', 'hourly_emails'); |
@@ -41,8 +41,9 @@ |
||
41 | 41 | */ |
42 | 42 | public function __construct(string $cwpurl, string $apikey, bool $sslverify = false, bool $debug = false) |
43 | 43 | { |
44 | - if (!filter_var($cwpurl, FILTER_VALIDATE_URL)) |
|
45 | - throw new Exception('Invalid URL!'); |
|
44 | + if (!filter_var($cwpurl, FILTER_VALIDATE_URL)) { |
|
45 | + throw new Exception('Invalid URL!'); |
|
46 | + } |
|
46 | 47 | $urllen = strlen($cwpurl) - 1; |
47 | 48 | $url = ($cwpurl[$urllen] == "/") ? mb_substr($cwpurl, 0, $urllen) : $cwpurl; |
48 | 49 |