Skip to content

Commit b04dea5

Browse files
committed
revert unrelevant changes
1 parent dab0055 commit b04dea5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/amqp-tools/ConnectionConfig.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,10 @@ public function __construct($config = null)
107107
/**
108108
* @param string[] $extensions
109109
*/
110-
public function addSupportedScheme(string $schema, array $extensions = []): self
110+
public function addSupportedScheme(string $schema): self
111111
{
112-
$this->supportedSchemes[$schema] = $extensions;
112+
$this->supportedSchemes[] = $schema;
113+
$this->supportedSchemes = array_unique($this->supportedSchemes);
113114

114115
return $this;
115116
}
@@ -380,7 +381,7 @@ private function parseDsn($dsn)
380381
{
381382
$dsn = new Dsn($dsn);
382383

383-
$supportedSchemes = array_keys($this->supportedSchemes);
384+
$supportedSchemes = $this->supportedSchemes;
384385
if (false == in_array($dsn->getSchemeProtocol(), $supportedSchemes, true)) {
385386
throw new \LogicException(sprintf(
386387
'The given scheme protocol "%s" is not supported. It must be one of "%s".',

0 commit comments

Comments
 (0)