Total Complexity | 12 |
Total Lines | 64 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
14 | class Dsn |
||
15 | { |
||
16 | /** |
||
17 | * @var string|null |
||
18 | */ |
||
19 | private $scheme; |
||
20 | |||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | private $parameters = []; |
||
25 | |||
26 | public function __construct(?string $scheme, array $parameters = []) |
||
30 | } |
||
31 | |||
32 | public function getScheme(): ?string |
||
33 | { |
||
34 | return $this->scheme; |
||
35 | } |
||
36 | |||
37 | public function getParameters(): array |
||
38 | { |
||
39 | return $this->parameters; |
||
40 | } |
||
41 | |||
42 | public function getParameter(string $key, $default = null) |
||
43 | { |
||
44 | return \array_key_exists($key, $this->parameters) ? $this->parameters[$key] : $default; |
||
45 | } |
||
46 | |||
47 | public function getHost(): ?string |
||
48 | { |
||
49 | return null; |
||
50 | } |
||
51 | |||
52 | public function getPort(): ?int |
||
53 | { |
||
54 | return null; |
||
55 | } |
||
56 | |||
57 | public function getPath(): ?string |
||
58 | { |
||
59 | return null; |
||
60 | } |
||
61 | |||
62 | public function getUser(): ?string |
||
63 | { |
||
64 | return null; |
||
65 | } |
||
66 | |||
67 | public function getPassword(): ?string |
||
70 | } |
||
71 | |||
72 | /** |
||
73 | * @var string |
||
74 | */ |
||
75 | public function __toString() |
||
78 | } |
||
79 | } |
||
80 |