Code Duplication    Length = 3-3 lines in 2 locations

src/Repository.php 2 locations

@@ 256-258 (lines=3) @@
253
            unset($this->persisted[$key]);
254
255
            $pk = [];
256
            foreach ($this->space->getPrimaryIndex()->parts as $part) {
257
                $pk[] = $this->original[$key][$part[0]];
258
            }
259
            foreach ($this->getMapper()->getPlugins() as $plugin) {
260
                $plugin->beforeRemove($instance, $this->space);
261
            }
@@ 293-295 (lines=3) @@
290
            }
291
292
            $pk = [];
293
            foreach ($this->space->getPrimaryIndex()->parts as $part) {
294
                $pk[] = $this->original[$key][$part[0]];
295
            }
296
297
            foreach ($this->getMapper()->getPlugins() as $plugin) {
298
                $plugin->beforeUpdate($instance, $this->space);