Skip to content

Commit ad9b8c5

Browse files
committed
fixed psalm bolt
1 parent 5079e2c commit ad9b8c5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Bolt/BoltConnection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function getAuthentication(): AuthenticateInterface
136136
*/
137137
public function isOpen(): bool
138138
{
139-
return !in_array($this->protocol()->serverState->get(), ['DISCONNECTED', 'DEFUNCT'], true);
139+
return !in_array($this->protocol()->serverState, [ServerState::DISCONNECTED, ServerState::DEFUNCT], true);
140140
}
141141

142142
public function setTimeout(float $timeout): void

src/Bolt/SslConfigurationFactory.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ class SslConfigurationFactory
3131
public function create(UriInterface $uri, SslConfiguration $config): array
3232
{
3333
$mode = $config->getMode();
34+
/** @var ''|'s'|'ssc' $sslConfig */
3435
$sslConfig = '';
3536
if ($mode === SslMode::FROM_URL()) {
3637
$scheme = $uri->getScheme();
3738
$explosion = explode('+', $scheme, 2);
39+
/** @var ''|'s'|'ssc' $sslConfig */
3840
$sslConfig = $explosion[1] ?? '';
3941
} elseif ($mode === SslMode::ENABLE()) {
4042
$sslConfig = 's';
@@ -46,7 +48,7 @@ public function create(UriInterface $uri, SslConfiguration $config): array
4648
return [$sslConfig, $this->enableSsl($uri->getHost(), $sslConfig, $config)];
4749
}
4850

49-
return [$sslConfig, []];
51+
return ['', []];
5052
}
5153

5254
/**

0 commit comments

Comments
 (0)