Skip to content

Commit ea2bb28

Browse files
committed
Changed: Constructor details will be preferred
1 parent a05513e commit ea2bb28

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

CPanel.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ public function __construct($cpanel_domain=null, $cpanel_api_token=null, $cpanel
2727

2828
$this->config = Config::get('cpanel');
2929

30-
if(isset($this->config) && isset($this->config['domain']))
30+
if(isset($cpanel_domain))
3131
{
32-
$this->protocol = $this->config['protocol'];
33-
$this->domain = $this->config['domain'];
34-
$this->port = $this->config['port'];
35-
$this->username = $this->config['username'];
36-
$this->token = $this->config['api_token'];
37-
} else{
3832
$this->protocol = $protocol;
3933
$this->port = $port;
4034
$this->domain = $cpanel_domain;
4135
$this->username = $cpanel_username;
4236
$this->token = $cpanel_api_token;
37+
} else{
38+
$this->protocol = $this->config['protocol'];
39+
$this->domain = $this->config['domain'];
40+
$this->port = $this->config['port'];
41+
$this->username = $this->config['username'];
42+
$this->token = $this->config['api_token'];
4343
}
4444

4545

0 commit comments

Comments
 (0)