Code Duplication    Length = 12-14 lines in 3 locations

src/DbalStore.php 3 locations

@@ 161-172 (lines=12) @@
158
    /**
159
     * {@inheritdoc}
160
     */
161
    public function remove($key)
162
    {
163
        KeyUtil::validate($key);
164
165
        try {
166
            $result = $this->connection->delete($this->tableName, array('meta_key' => $key));
167
        } catch (Exception $e) {
168
            throw WriteException::forException($e);
169
        }
170
171
        return $result === 1;
172
    }
173
174
    /**
175
     * {@inheritdoc}
@@ 248-260 (lines=13) @@
245
        return $table;
246
    }
247
248
    private function doInsert($key, $value)
249
    {
250
        $serialized = Serializer::serialize($value);
251
252
        try {
253
            $this->connection->insert($this->tableName, array(
254
                'meta_key' => $key,
255
                'meta_value' => $serialized,
256
            ));
257
        } catch (Exception $e) {
258
            throw WriteException::forException($e);
259
        }
260
    }
261
262
    private function doUpdate($key, $value)
263
    {
@@ 262-275 (lines=14) @@
259
        }
260
    }
261
262
    private function doUpdate($key, $value)
263
    {
264
        $serialized = Serializer::serialize($value);
265
266
        try {
267
            $this->connection->update($this->tableName, array(
268
                'meta_value' => $serialized,
269
            ), array(
270
                'meta_key' => $key,
271
            ));
272
        } catch (Exception $e) {
273
            throw WriteException::forException($e);
274
        }
275
    }
276
277
    private function doGetMultiple(array $keys)
278
    {