Code Duplication    Length = 7-8 lines in 2 locations

src/Xhgui/Storage/Mongo.php 2 locations

@@ 125-131 (lines=7) @@
122
     * @throws MongoCursorTimeoutException
123
     * @throws MongoException
124
     */
125
    public function remove($id)
126
    {
127
        return $this->connection->{$this->collection}->remove(
128
            array('_id' => new MongoId($id)),
129
            array('w' => 1)
130
        );
131
    }
132
133
    /**
134
     * @param $data
@@ 156-163 (lines=8) @@
153
     * @throws \MongoException
154
     * @throws \MongoWriteConcernException
155
     */
156
    public function update($id, array $data)
157
    {
158
        return $this->connection->{$this->collection}->update(
159
            array('_id' => new MongoId($id)),
160
            $data,
161
            array('w' => 1)
162
        );
163
    }
164
165
    /**
166
     *