ConnectionInterface::connect()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Genkgo\Mail\Protocol;
5
6
use Genkgo\Mail\Exception\SecureConnectionUpgradeException;
7
8
interface ConnectionInterface
9
{
10
    /**
11
     * @param string $name
12
     * @param \Closure $callback
13
     */
14
    public function addListener(string $name, \Closure $callback): void;
15
16
    /**
17
     * @return void
18
     */
19
    public function connect(): void;
20
21
    /**
22
     * @return void
23
     */
24
    public function disconnect(): void;
25
26
    /**
27
     * @param string $request
28
     * @return int
29
     */
30
    public function send(string $request): int;
31
32
    /**
33
     * @return string
34
     */
35
    public function receive(): string;
36
37
    /**
38
     * @param int $type
39
     * @throws SecureConnectionUpgradeException
40
     */
41
    public function upgrade(int $type): void;
42
43
    /**
44
     * @param float $timeout
45
     */
46
    public function timeout(float $timeout): void;
47
48
    /**
49
     * @param array<int, string> $keys
50
     * @return array<string, mixed>
0 ignored issues
show
Documentation introduced by
The doc-type array<string, could not be parsed: Expected ">" at position 5, but found "end of type". (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
51
     */
52
    public function getMetaData(array $keys = []): array;
53
}
54