File tree Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Original file line number Diff line number Diff line change 5
5
use function class_exists ;
6
6
use Composer \InstalledVersions ;
7
7
use Illuminate \Database \Connection as BaseConnection ;
8
- use Illuminate \Support \Arr ;
9
8
use InvalidArgumentException ;
10
9
use Jenssegers \Mongodb \Concerns \ManagesTransactions ;
11
10
use MongoDB \Client ;
@@ -48,7 +47,7 @@ public function __construct(array $config)
48
47
$ dsn = $ this ->getDsn ($ config );
49
48
50
49
// You can pass options directly to the MongoDB constructor
51
- $ options = Arr:: get ( $ config, 'options ' , []) ;
50
+ $ options = $ config[ 'options ' ] ?? [] ;
52
51
53
52
// Create the connection
54
53
$ this ->connection = $ this ->createConnection ($ dsn , $ config , $ options );
Original file line number Diff line number Diff line change 10
10
use Illuminate \Support \Arr ;
11
11
use Illuminate \Support \Collection ;
12
12
use Illuminate \Support \LazyCollection ;
13
- use Illuminate \Support \Str ;
14
13
use Jenssegers \Mongodb \Connection ;
15
14
use MongoDB \BSON \Binary ;
16
15
use MongoDB \BSON \ObjectID ;
Original file line number Diff line number Diff line change 4
4
5
5
use Illuminate \Database \ConnectionResolverInterface ;
6
6
use Illuminate \Queue \Connectors \ConnectorInterface ;
7
- use Illuminate \Support \Arr ;
8
7
9
8
class MongoConnector implements ConnectorInterface
10
9
{
@@ -34,10 +33,10 @@ public function __construct(ConnectionResolverInterface $connections)
34
33
public function connect (array $ config )
35
34
{
36
35
return new MongoQueue (
37
- $ this ->connections ->connection (Arr:: get ( $ config, 'connection ' ) ),
36
+ $ this ->connections ->connection ($ config[ 'connection ' ] ),
38
37
$ config ['table ' ],
39
38
$ config ['queue ' ],
40
- Arr:: get ( $ config, 'expire ' , 60 )
39
+ $ config[ 'expire ' ] ?? 60
41
40
);
42
41
}
43
42
}
You can’t perform that action at this time.
0 commit comments