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)
4545 );
4646 }
4747
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) {
4950 $ client = $ options [self ::OPTION_CLIENT ];
5051 } elseif (isset ($ options [self ::OPTION_URL ])) {
5152 // set a descriptive user agent
@@ -133,7 +134,13 @@ public function useDb($options) : Database
133134 $ db_name = $ options [self ::OPTION_NAME ];
134135 }
135136
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+ }
137144
138145 // does this database exist?
139146 $ exists = false ;
You can’t perform that action at this time.
0 commit comments