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 55use function class_exists ;
66use Composer \InstalledVersions ;
77use Illuminate \Database \Connection as BaseConnection ;
8- use Illuminate \Support \Arr ;
98use InvalidArgumentException ;
109use Jenssegers \Mongodb \Concerns \ManagesTransactions ;
1110use MongoDB \Client ;
@@ -48,7 +47,7 @@ public function __construct(array $config)
4847 $ dsn = $ this ->getDsn ($ config );
4948
5049 // You can pass options directly to the MongoDB constructor
51- $ options = Arr:: get ( $ config, 'options ' , []) ;
50+ $ options = $ config[ 'options ' ] ?? [] ;
5251
5352 // Create the connection
5453 $ this ->connection = $ this ->createConnection ($ dsn , $ config , $ options );
Original file line number Diff line number Diff line change 1010use Illuminate \Support \Arr ;
1111use Illuminate \Support \Collection ;
1212use Illuminate \Support \LazyCollection ;
13- use Illuminate \Support \Str ;
1413use Jenssegers \Mongodb \Connection ;
1514use MongoDB \BSON \Binary ;
1615use MongoDB \BSON \ObjectID ;
Original file line number Diff line number Diff line change 44
55use Illuminate \Database \ConnectionResolverInterface ;
66use Illuminate \Queue \Connectors \ConnectorInterface ;
7- use Illuminate \Support \Arr ;
87
98class MongoConnector implements ConnectorInterface
109{
@@ -34,10 +33,10 @@ public function __construct(ConnectionResolverInterface $connections)
3433 public function connect (array $ config )
3534 {
3635 return new MongoQueue (
37- $ this ->connections ->connection (Arr:: get ( $ config, 'connection ' ) ),
36+ $ this ->connections ->connection ($ config[ 'connection ' ] ),
3837 $ config ['table ' ],
3938 $ config ['queue ' ],
40- Arr:: get ( $ config, 'expire ' , 60 )
39+ $ config[ 'expire ' ] ?? 60
4140 );
4241 }
4342}
You can’t perform that action at this time.
0 commit comments