@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | if ($item instanceof Item) { |
73 | 73 | try{ |
74 | 74 | $this->instance->putDocument(['data' => $this->encode($this->driverPreWrap($item))], $item->getEncodedKey(), $this->getLatestDocumentRevision($item->getEncodedKey())); |
75 | - }catch (CouchDBException $e){ |
|
75 | + } catch (CouchDBException $e){ |
|
76 | 76 | throw new phpFastCacheDriverException('Got error while trying to upsert a document: ' . $e->getMessage(), null, $e); |
77 | 77 | } |
78 | 78 | return true; |
@@ -90,15 +90,15 @@ discard block |
||
90 | 90 | { |
91 | 91 | try{ |
92 | 92 | $response = $this->instance->findDocument($item->getEncodedKey()); |
93 | - }catch (CouchDBException $e){ |
|
93 | + } catch (CouchDBException $e){ |
|
94 | 94 | throw new phpFastCacheDriverException('Got error while trying to get a document: ' . $e->getMessage(), null, $e); |
95 | 95 | } |
96 | 96 | |
97 | 97 | if($response->status === 404 || empty($response->body['data'])){ |
98 | 98 | return null; |
99 | - }else if($response->status === 200){ |
|
99 | + } else if($response->status === 200){ |
|
100 | 100 | return $this->decode($response->body['data']); |
101 | - }else{ |
|
101 | + } else{ |
|
102 | 102 | throw new phpFastCacheDriverException('Got unexpected HTTP status: ' . $response->status); |
103 | 103 | } |
104 | 104 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | if ($item instanceof Item) { |
118 | 118 | try{ |
119 | 119 | $this->instance->deleteDocument($item->getEncodedKey(), $this->getLatestDocumentRevision($item->getEncodedKey())); |
120 | - }catch (CouchDBException $e){ |
|
120 | + } catch (CouchDBException $e){ |
|
121 | 121 | throw new phpFastCacheDriverException('Got error while trying to delete a document: ' . $e->getMessage(), null, $e); |
122 | 122 | } |
123 | 123 | return true; |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | try{ |
136 | 136 | $this->instance->deleteDatabase($this->getDatabaseName()); |
137 | 137 | $this->createDatabase(); |
138 | - }catch (CouchDBException $e){ |
|
138 | + } catch (CouchDBException $e){ |
|
139 | 139 | throw new phpFastCacheDriverException('Got error while trying to delete and recreate the database: ' . $e->getMessage(), null, $e); |
140 | 140 | } |
141 | 141 |