@@ -91,7 +91,7 @@ protected static function createSocketConnection($connection, AMQPConnectionConf
9191 $ config ->getVhost (),
9292 $ config ->isInsist (),
9393 $ config ->getLoginMethod (),
94- $ config ->getLoginResponse () ?? null ,
94+ $ config ->getLoginResponse (),
9595 $ config ->getLocale (),
9696 $ config ->getReadTimeout (),
9797 $ config ->isKeepalive (),
@@ -159,25 +159,16 @@ protected static function getReadWriteTimeout(AMQPConnectionConfig $config): flo
159159
160160 protected static function getSslOptions (AMQPConnectionConfig $ config ): array
161161 {
162- $ path = null ;
163- if (method_exists ($ config , 'getSslCaPath ' )) {
164- $ path = $ config ->getSslCaPath ();
165- }
166- $ securityLevel = null ;
167- if (method_exists ($ config , 'getSslSecurityLevel ' )) {
168- $ securityLevel = $ config ->getSslSecurityLevel ();
169- }
170-
171162 return array_filter ([
172163 'cafile ' => $ config ->getSslCaCert (),
173- 'capath ' => $ path ,
164+ 'capath ' => $ config -> getSslCaPath () ,
174165 'local_cert ' => $ config ->getSslCert (),
175166 'local_pk ' => $ config ->getSslKey (),
176167 'verify_peer ' => $ config ->getSslVerify (),
177168 'verify_peer_name ' => $ config ->getSslVerifyName (),
178169 'passphrase ' => $ config ->getSslPassPhrase (),
179170 'ciphers ' => $ config ->getSslCiphers (),
180- 'security_level ' => $ securityLevel ,
171+ 'security_level ' => $ config -> getSslSecurityLevel () ,
181172 ], static function ($ value ) {
182173 return $ value !== null ;
183174 });
0 commit comments