File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,8 @@ public function __construct(array $options)
45
45
);
46
46
}
47
47
48
- if (isset ($ options [self ::OPTION_CLIENT ]) && $ options [self ::OPTION_CLIENT ] instanceof \GuzzleHttp \ClientInterface) {
48
+ if (isset ($ options [self ::OPTION_CLIENT ])
49
+ && $ options [self ::OPTION_CLIENT ] instanceof \GuzzleHttp \ClientInterface) {
49
50
$ client = $ options [self ::OPTION_CLIENT ];
50
51
} elseif (isset ($ options [self ::OPTION_URL ])) {
51
52
// set a descriptive user agent
@@ -133,7 +134,13 @@ public function useDb($options) : Database
133
134
$ db_name = $ options [self ::OPTION_NAME ];
134
135
}
135
136
136
- $ create_if_not_exists = isset ($ options [self ::OPTION_CREATE_IF_NOT_EXISTS ]) ? $ options [self ::OPTION_CREATE_IF_NOT_EXISTS ] : false ;
137
+
138
+ if (isset ($ options [self ::OPTION_CREATE_IF_NOT_EXISTS ])) {
139
+ $ create_if_not_exists = $ options [self ::OPTION_CREATE_IF_NOT_EXISTS ];
140
+ } else {
141
+ // default value
142
+ $ create_if_not_exists = false ;
143
+ }
137
144
138
145
// does this database exist?
139
146
$ exists = false ;
You can’t perform that action at this time.
0 commit comments