Code Duplication    Length = 11-11 lines in 3 locations

src/AbstractDoctrineRepository.php 3 locations

@@ 159-169 (lines=11) @@
156
    /**
157
     * @param ModelInterface $model
158
     */
159
    public function insert(ModelInterface $model)
160
    {
161
        $this->logger->info(
162
            'model: insert model {model} with id {id}',
163
            ['model' => get_class($model), 'id' => $model->getId()]
164
        );
165
166
        $this->connection->insert($this->getTable(), $model->toRow());
167
168
        $this->cache->set($model);
169
    }
170
171
    /**
172
     * @param ModelInterface $model
@@ 174-184 (lines=11) @@
171
    /**
172
     * @param ModelInterface $model
173
     */
174
    public function update(ModelInterface $model)
175
    {
176
        $this->logger->info(
177
            'model: update model {model} with id {id}',
178
            ['model' => get_class($model), 'id' => $model->getId()]
179
        );
180
181
        $this->connection->update($this->getTable(), $model->toRow(), ['id' => $model->getId()]);
182
183
        $this->cache->set($model);
184
    }
185
186
    /**
187
     * @param ModelInterface $model
@@ 189-199 (lines=11) @@
186
    /**
187
     * @param ModelInterface $model
188
     */
189
    public function delete(ModelInterface $model)
190
    {
191
        $this->logger->info(
192
            'model: delete model {model} with id {id}',
193
            ['model' => get_class($model), 'id' => $model->getId()]
194
        );
195
196
        $this->connection->delete($this->getTable(), ['id' => $model->getId()]);
197
198
        $this->cache->remove($model->getId());
199
    }
200
201
    /**
202
     * @param array $row