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
260
            foreach ($this->getMapper()->getPlugins() as $plugin) {
261
                $plugin->beforeRemove($instance, $this->space);
@@ 299-301 (lines=3) @@
296
            }
297
298
            $pk = [];
299
            foreach ($this->space->getPrimaryIndex()->parts as $part) {
300
                $pk[] = $this->original[$key][$part[0]];
301
            }
302
303
            foreach ($this->getMapper()->getPlugins() as $plugin) {
304
                $plugin->beforeUpdate($instance, $this->space);