@@ -168,25 +168,25 @@ public function getDocById($id) : Document
168
168
public function getView ($ options = []) : array
169
169
{
170
170
// check we have ddoc and view name
171
- if (!isset ($ options ['ddoc ' ])) {
171
+ if (!isset ($ options ['ddoc ' ])) {
172
172
throw new Exception \ServerException (
173
173
'ddoc is a required parameter for getView '
174
174
);
175
175
}
176
- if (!isset ($ options ['view ' ])) {
176
+ if (!isset ($ options ['view ' ])) {
177
177
throw new Exception \ServerException (
178
178
'view is a required parameter for getView '
179
179
);
180
180
}
181
181
182
- $ endpoint = "/ " . $ this ->db_name . "/_design/ " . $ options ['ddoc ' ]
182
+ $ endpoint = "/ " . $ this ->db_name . "/_design/ " . $ options ['ddoc ' ]
183
183
. "/_view/ " . $ options ['view ' ];
184
184
185
185
// grab extra params
186
186
$ query = [];
187
- foreach ($ options as $ key => $ value ) {
187
+ foreach ($ options as $ key => $ value ) {
188
188
// skip the values we need for the URL, pass the rest through
189
- if (!in_array ($ key , ["ddoc " , "view " ])) {
189
+ if (!in_array ($ key , ["ddoc " , "view " ])) {
190
190
$ query [$ key ] = $ value ;
191
191
}
192
192
}
@@ -205,7 +205,8 @@ public function getView($options = []) : array
205
205
return $ data ;
206
206
}
207
207
208
- protected function handleServerResponse ($ response ) : array {
208
+ protected function handleServerResponse ($ response ) : arrayxi
209
+ {
209
210
if ($ response ->getStatusCode () == 200 ) {
210
211
// try to decode JSON
211
212
if ($ json_data = json_decode ($ response ->getBody (), true )) {
@@ -225,5 +226,4 @@ protected function handleServerResponse($response) : array {
225
226
}
226
227
}
227
228
}
228
-
229
229
}
0 commit comments