@@ -83,7 +83,7 @@ |
||
| 83 | 83 | |
| 84 | 84 | public function addDisclose($value, $flag = 0) |
| 85 | 85 | { |
| 86 | - $this->appendDisclose(sprintf('contact:disclose[@flag=\'%d\']/contact:%s', (int)$flag, $value)); |
|
| 86 | + $this->appendDisclose(sprintf('contact:disclose[@flag=\'%d\']/contact:%s', (int) $flag, $value)); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | /** |
@@ -40,21 +40,21 @@ discard block |
||
| 40 | 40 | public function __construct(array $config) |
| 41 | 41 | { |
| 42 | 42 | if (!empty($config['host'])) { |
| 43 | - $this->host = (string)$config['host']; |
|
| 43 | + $this->host = (string) $config['host']; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | if (!empty($config['port'])) { |
| 47 | - $this->port = (int)$config['port']; |
|
| 47 | + $this->port = (int) $config['port']; |
|
| 48 | 48 | } else { |
| 49 | 49 | $this->port = 700; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | if (!empty($config['username'])) { |
| 53 | - $this->username = (string)$config['username']; |
|
| 53 | + $this->username = (string) $config['username']; |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | if (!empty($config['password'])) { |
| 57 | - $this->password = (string)$config['password']; |
|
| 57 | + $this->password = (string) $config['password']; |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | if (!empty($config['services']) && is_array($config['services'])) { |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | if (!empty($config['local_cert'])) { |
| 75 | - $this->local_cert = (string)$config['local_cert']; |
|
| 75 | + $this->local_cert = (string) $config['local_cert']; |
|
| 76 | 76 | |
| 77 | 77 | if (!is_readable($this->local_cert)) { |
| 78 | 78 | throw new Exception(sprintf('unable to read local_cert: %s', $this->local_cert)); |
@@ -90,13 +90,13 @@ discard block |
||
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | if (!empty($config['connect_timeout'])) { |
| 93 | - $this->connect_timeout = (int)$config['connect_timeout']; |
|
| 93 | + $this->connect_timeout = (int) $config['connect_timeout']; |
|
| 94 | 94 | } else { |
| 95 | 95 | $this->connect_timeout = 4; |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | if (!empty($config['timeout'])) { |
| 99 | - $this->timeout = (int)$config['timeout']; |
|
| 99 | + $this->timeout = (int) $config['timeout']; |
|
| 100 | 100 | } else { |
| 101 | 101 | $this->timeout = 8; |
| 102 | 102 | } |
@@ -206,9 +206,9 @@ discard block |
||
| 206 | 206 | $frame->setClientTransactionId($this->generateClientTransactionId()); |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | - $buffer = (string)$frame; |
|
| 209 | + $buffer = (string) $frame; |
|
| 210 | 210 | $header = pack('N', mb_strlen($buffer, 'ASCII') + 4); |
| 211 | - return $this->send($header . $buffer); |
|
| 211 | + return $this->send($header.$buffer); |
|
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | /** |