Code Duplication    Length = 3-3 lines in 2 locations

src/Repository.php 2 locations

@@ 272-274 (lines=3) @@
269
            unset($this->persisted[$key]);
270
271
            $pk = [];
272
            foreach ($this->space->getPrimaryIndex()->parts as $part) {
273
                $pk[] = $this->original[$key][$part[0]];
274
            }
275
276
            foreach ($this->getMapper()->getPlugins() as $plugin) {
277
                $plugin->beforeRemove($instance, $this->space);
@@ 314-316 (lines=3) @@
311
            }
312
313
            $pk = [];
314
            foreach ($this->space->getPrimaryIndex()->parts as $part) {
315
                $pk[] = $this->original[$key][$part[0]];
316
            }
317
318
            foreach ($this->getMapper()->getPlugins() as $plugin) {
319
                $plugin->beforeUpdate($instance, $this->space);