@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | */ |
31 | 31 | function __construct($host = null, $port = null, $timeout = 15) { |
32 | 32 | $this->host = ($host) ? $host : ini_get('SMTP'); |
33 | - if(!$this->host) $this->host = 'localhost'; |
|
33 | + if (!$this->host) $this->host = 'localhost'; |
|
34 | 34 | |
35 | 35 | $this->port = ($port) ? $port : ini_get('smtp_port'); |
36 | - if(!$this->port) $this->port = 25; |
|
36 | + if (!$this->port) $this->port = 25; |
|
37 | 37 | |
38 | 38 | $this->timeout = $timeout; |
39 | 39 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | function check() { |
47 | 47 | $f = @fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout); |
48 | - if(!$f) { |
|
48 | + if (!$f) { |
|
49 | 49 | return array( |
50 | 50 | EnvironmentCheck::ERROR, |
51 | 51 | sprintf("Couldn't connect to SMTP on %s:%s (Error: %s %s)", $this->host, $this->port, $errno, $errstr) |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | fwrite($f, "HELO its_me\r\n"); |
56 | 56 | $response = fread($f, 26); |
57 | - if(substr($response, 0, 3) != '220') { |
|
57 | + if (substr($response, 0, 3) != '220') { |
|
58 | 58 | return array( |
59 | 59 | EnvironmentCheck::ERROR, |
60 | 60 | sprintf("Invalid mail server response: %s", $response) |
@@ -30,10 +30,14 @@ |
||
30 | 30 | */ |
31 | 31 | function __construct($host = null, $port = null, $timeout = 15) { |
32 | 32 | $this->host = ($host) ? $host : ini_get('SMTP'); |
33 | - if(!$this->host) $this->host = 'localhost'; |
|
33 | + if(!$this->host) { |
|
34 | + $this->host = 'localhost'; |
|
35 | + } |
|
34 | 36 | |
35 | 37 | $this->port = ($port) ? $port : ini_get('smtp_port'); |
36 | - if(!$this->port) $this->port = 25; |
|
38 | + if(!$this->port) { |
|
39 | + $this->port = 25; |
|
40 | + } |
|
37 | 41 | |
38 | 42 | $this->timeout = $timeout; |
39 | 43 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | /** |
29 | 29 | * @inheritdoc |
30 | 30 | * |
31 | - * @return array |
|
31 | + * @return string[] |
|
32 | 32 | * |
33 | 33 | * @throws SS_HTTPResponse_Exception |
34 | 34 | */ |
@@ -28,7 +28,7 @@ |
||
28 | 28 | /** |
29 | 29 | * @inheritdoc |
30 | 30 | * |
31 | - * @return array |
|
31 | + * @return string[] |
|
32 | 32 | * |
33 | 33 | * @throws SS_HTTPResponse_Exception |
34 | 34 | */ |