1 | <?php |
||
5 | class ConnectionParameters |
||
6 | { |
||
7 | const DEFAULT_PORT = 5672; |
||
8 | |||
9 | const DEFAULT_USER = 'guest'; |
||
10 | |||
11 | const DEFAULT_PASSWORD = 'guest'; |
||
12 | |||
13 | const LOGIN_METHOD = 'AMQPLAIN'; |
||
14 | |||
15 | const LOCALE = 'en_US'; |
||
16 | |||
17 | const CONNECTION_TIMEOUT = 3.0; |
||
18 | |||
19 | const READ_WRITE_TIMEOUT = 3.0; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $host; |
||
25 | |||
26 | /** |
||
27 | * @var int |
||
28 | */ |
||
29 | private $port; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | private $user; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | private $password; |
||
40 | |||
41 | /** |
||
42 | * @var string |
||
43 | */ |
||
44 | private $vhost; |
||
45 | |||
46 | /** |
||
47 | * @var bool |
||
48 | */ |
||
49 | private $insist; |
||
50 | |||
51 | /** |
||
52 | * @var string |
||
53 | */ |
||
54 | private $loginMethod; |
||
55 | |||
56 | private $loginResponse; |
||
57 | |||
58 | /** |
||
59 | * @var string |
||
60 | */ |
||
61 | private $locale; |
||
62 | |||
63 | /** |
||
64 | * @var int |
||
65 | */ |
||
66 | private $connectionTimeout; |
||
67 | |||
68 | /** |
||
69 | * @var int |
||
70 | */ |
||
71 | private $readWriteTimeout; |
||
72 | |||
73 | /** |
||
74 | * @var null |
||
75 | */ |
||
76 | private $context; |
||
77 | |||
78 | /** |
||
79 | * @var bool |
||
80 | */ |
||
81 | private $keepalive; |
||
82 | |||
83 | /** |
||
84 | * @var int |
||
85 | */ |
||
86 | private $heartbeat; |
||
87 | |||
88 | 3 | public function __construct( |
|
120 | |||
121 | 1 | public function getHost() : string |
|
125 | |||
126 | 1 | public function getPort() : int |
|
130 | |||
131 | 1 | public function getUser() : string |
|
135 | |||
136 | 1 | public function getPassword() : string |
|
140 | |||
141 | 1 | public function getVhost() : string |
|
145 | |||
146 | 1 | public function shouldInsist() : bool |
|
150 | |||
151 | 1 | public function getLoginMethod() : string |
|
155 | |||
156 | 1 | public function getLoginResponse() |
|
160 | |||
161 | 1 | public function getLocale() : string |
|
165 | |||
166 | 1 | public function getConnectionTimeout() : int |
|
170 | |||
171 | 1 | public function getReadWriteTimeout() : int |
|
175 | |||
176 | 1 | public function getContext() |
|
180 | |||
181 | 1 | public function shouldKeepalive() : bool |
|
185 | |||
186 | 1 | public function getHeartbeat() : int |
|
190 | } |
||
191 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.