Skip to content

Commit f7f6cc0

Browse files
committed
[amqp] ConnectionConfig::addSupportedSchemes -> addSupportedScheme
1 parent 6a80a7c commit f7f6cc0

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎pkg/amqp-bunny/AmqpConnectionFactory.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class AmqpConnectionFactory implements InteropAmqpConnectionFactory, DelayStrate
3333
public function __construct($config = 'amqp:')
3434
{
3535
$this->config = (new ConnectionConfig($config))
36-
->addSupportedSchemes('amqp+bunny')
36+
->addSupportedScheme('amqp+bunny')
3737
->addDefaultOption('receive_method', 'basic_get')
3838
->addDefaultOption('tcp_nodelay', null)
3939
->parse()

‎pkg/amqp-ext/AmqpConnectionFactory.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class AmqpConnectionFactory implements InteropAmqpConnectionFactory, DelayStrate
3232
public function __construct($config = 'amqp:')
3333
{
3434
$this->config = (new ConnectionConfig($config))
35-
->addSupportedSchemes('amqp+ext')
35+
->addSupportedScheme('amqp+ext')
3636
->addDefaultOption('receive_method', 'basic_get')
3737
->parse()
3838
;

‎pkg/amqp-lib/AmqpConnectionFactory.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class AmqpConnectionFactory implements InteropAmqpConnectionFactory, DelayStrate
3737
public function __construct($config = 'amqp:')
3838
{
3939
$this->config = (new ConnectionConfig($config))
40-
->addSupportedSchemes('amqp+lib')
40+
->addSupportedScheme('amqp+lib')
4141
->addDefaultOption('stream', true)
4242
->addDefaultOption('insist', false)
4343
->addDefaultOption('login_method', 'AMQPLAIN')

‎pkg/amqp-tools/ConnectionConfig.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ public function __construct($config = null)
7575
'qos_prefetch_count' => 1,
7676
];
7777

78-
$this->addSupportedSchemes('amqp');
78+
$this->addSupportedScheme('amqp');
7979
}
8080

8181
/**
8282
* @param string $schema
8383
*
8484
* @return self
8585
*/
86-
public function addSupportedSchemes($schema)
86+
public function addSupportedScheme($schema)
8787
{
8888
$this->supportedSchemes[] = $schema;
8989
$this->supportedSchemes = array_unique($this->supportedSchemes);

‎pkg/amqp-tools/Tests/ConnectionConfigTest.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function testThrowIfSchemeIsNotSupportedIncludingAdditionalSupportedSchem
3535
$this->expectExceptionMessage('The given DSN scheme "http" is not supported. Could be one of "amqp", "amqp+foo" only.');
3636

3737
(new ConnectionConfig('http://example.com'))
38-
->addSupportedSchemes('amqp+foo')
38+
->addSupportedScheme('amqp+foo')
3939
->parse()
4040
;
4141
}
@@ -51,7 +51,7 @@ public function testThrowIfDsnCouldNotBeParsed()
5151
public function testShouldParseEmptyDsnWithDriverSet()
5252
{
5353
$config = (new ConnectionConfig('amqp+foo:'))
54-
->addSupportedSchemes('amqp+foo')
54+
->addSupportedScheme('amqp+foo')
5555
->parse()
5656
;
5757

@@ -76,7 +76,7 @@ public function testShouldParseEmptyDsnWithDriverSet()
7676
public function testShouldParseCustomDsnWithDriverSet()
7777
{
7878
$config = (new ConnectionConfig('amqp+foo://user:pass@host:10000/vhost'))
79-
->addSupportedSchemes('amqp+foo')
79+
->addSupportedScheme('amqp+foo')
8080
->parse()
8181
;
8282

0 commit comments

Comments
 (0)