| Total Complexity | 2 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class SecureSocketConnector extends SocketConnector |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var int |
||
| 12 | */ |
||
| 13 | private $crypto_method; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param string $host SMTP SSL host-name |
||
| 17 | * @param int $port SMTP port-number |
||
| 18 | * @param int $crypto_method one of the STREAM_CRYPTO_METHOD_* constants (defined by PHP) |
||
| 19 | * |
||
| 20 | * @see stream_socket_enable_crypto() |
||
| 21 | */ |
||
| 22 | public function __construct(string $host, int $port = 25, int $crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT) |
||
| 23 | { |
||
| 24 | parent::__construct($host, $port); |
||
| 25 | |||
| 26 | $this->crypto_method = $crypto_method; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @throws SMTPException |
||
| 31 | */ |
||
| 32 | public function connect(string $client_domain): SMTPClient |
||
| 41 | } |
||
| 42 | } |
||
| 43 |