Skip to content

Commit cddf55f

Browse files
committed
Merge remote-tracking branch 'origin/master' into merge08
2 parents e7c5d1e + e68c03c commit cddf55f

30 files changed

+747
-1194
lines changed

Client/MongodbDriver.php

Lines changed: 0 additions & 186 deletions
This file was deleted.

MongodbConnectionFactory.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Enqueue\Mongodb;
46

5-
use Interop\Queue\PsrConnectionFactory;
7+
use Interop\Queue\ConnectionFactory;
8+
use Interop\Queue\Context;
69
use MongoDB\Client;
710

8-
class MongodbConnectionFactory implements PsrConnectionFactory
11+
class MongodbConnectionFactory implements ConnectionFactory
912
{
1013
/**
1114
* @var array
@@ -48,14 +51,17 @@ public function __construct($config = 'mongodb:')
4851
$this->config = $config;
4952
}
5053

51-
public function createContext()
54+
/**
55+
* @return MongodbContext
56+
*/
57+
public function createContext(): Context
5258
{
5359
$client = new Client($this->config['dsn']);
5460

5561
return new MongodbContext($client, $this->config);
5662
}
5763

58-
public static function parseDsn($dsn)
64+
public static function parseDsn(string $dsn): array
5965
{
6066
$parsedUrl = parse_url($dsn);
6167
if (false === $parsedUrl) {

0 commit comments

Comments
 (0)