@@ -35,7 +35,7 @@ |
||
| 35 | 35 | public function impersonate() |
| 36 | 36 | { |
| 37 | 37 | /** @var AdminContext $context */ |
| 38 | - if (!($context = $this->getContext()) instanceof AdminContext) { |
|
| 38 | + if(!($context = $this->getContext()) instanceof AdminContext) { |
|
| 39 | 39 | throw new DirectAdminException('You need to be an admin to impersonate another admin'); |
| 40 | 40 | } |
| 41 | 41 | return $context->impersonateAdmin($this->getUsername()); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $this->domainName = $data['domain']; |
| 70 | 70 | |
| 71 | 71 | // Determine owner |
| 72 | - if ($data['username'] === $context->getUsername()) { |
|
| 72 | + if($data['username'] === $context->getUsername()) { |
|
| 73 | 73 | $this->owner = $context->getContextUser(); |
| 74 | 74 | } else { |
| 75 | 75 | throw new DirectAdminException('Could not determine relationship between context user and domain'); |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | 'from' => $domain, |
| 153 | 153 | 'action' => 'add', |
| 154 | 154 | ]; |
| 155 | - if ($alias) { |
|
| 155 | + if($alias) { |
|
| 156 | 156 | $parameters['alias'] = 'yes'; |
| 157 | 157 | $list = &$this->aliases; |
| 158 | 158 | } else { |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | */ |
| 244 | 244 | public function getDomainNames() |
| 245 | 245 | { |
| 246 | - return $this->getCache('domainNames', function () { |
|
| 246 | + return $this->getCache('domainNames', function() { |
|
| 247 | 247 | $list = array_merge($this->aliases, $this->pointers, [$this->getDomainName()]); |
| 248 | 248 | sort($list); |
| 249 | 249 | return $list; |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | */ |
| 256 | 256 | public function getForwarders() |
| 257 | 257 | { |
| 258 | - return $this->getCache(self::CACHE_FORWARDERS, function () { |
|
| 258 | + return $this->getCache(self::CACHE_FORWARDERS, function() { |
|
| 259 | 259 | $forwarders = $this->getContext()->invokeGet('EMAIL_FORWARDERS', [ |
| 260 | 260 | 'domain' => $this->getDomainName(), |
| 261 | 261 | ]); |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | */ |
| 269 | 269 | public function getMailboxes() |
| 270 | 270 | { |
| 271 | - return $this->getCache(self::CACHE_MAILBOXES, function () { |
|
| 271 | + return $this->getCache(self::CACHE_MAILBOXES, function() { |
|
| 272 | 272 | $boxes = $this->getContext()->invokeGet('POP', [ |
| 273 | 273 | 'domain' => $this->getDomainName(), |
| 274 | 274 | 'action' => 'full_list', |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | */ |
| 299 | 299 | public function getSubdomains() |
| 300 | 300 | { |
| 301 | - return $this->getCache(self::CACHE_SUBDOMAINS, function () { |
|
| 301 | + return $this->getCache(self::CACHE_SUBDOMAINS, function() { |
|
| 302 | 302 | $subs = $this->getContext()->invokeGet('SUBDOMAINS', ['domain' => $this->getDomainName()]); |
| 303 | 303 | $subs = array_combine($subs, $subs); |
| 304 | 304 | return DomainObject::toDomainObjectArray($subs, Subdomain::class, $this); |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | 'action' => $action, |
| 321 | 321 | 'domain' => $this->domainName, |
| 322 | 322 | ], $parameters)); |
| 323 | - if ($clearCache) { |
|
| 323 | + if($clearCache) { |
|
| 324 | 324 | $this->clearCache(); |
| 325 | 325 | } |
| 326 | 326 | return $response; |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | public function deleteAccounts(array $usernames) |
| 84 | 84 | { |
| 85 | 85 | $options = ['confirmed' => 'Confirm', 'delete' => 'yes']; |
| 86 | - foreach (array_values($usernames) as $idx => $username) { |
|
| 86 | + foreach(array_values($usernames) as $idx => $username) { |
|
| 87 | 87 | $options["select{$idx}"] = $username; |
| 88 | 88 | } |
| 89 | 89 | $this->invokePost('SELECT_USERS', $options); |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | public function suspendAccounts(array $usernames, $suspend = true) |
| 118 | 118 | { |
| 119 | 119 | $options = ['suspend' => $suspend ? 'Suspend' : 'Unsuspend']; |
| 120 | - foreach (array_values($usernames) as $idx => $username) { |
|
| 120 | + foreach(array_values($usernames) as $idx => $username) { |
|
| 121 | 121 | $options["select{$idx}"] = $username; |
| 122 | 122 | } |
| 123 | 123 | $this->invokePost('SELECT_USERS', $options); |