Code Duplication    Length = 3-3 lines in 2 locations

src/Repository.php 2 locations

@@ 320-322 (lines=3) @@
317
            unset($this->persisted[$key]);
318
319
            $pk = [];
320
            foreach ($this->space->getPrimaryIndex()['parts'] as $part) {
321
                $pk[] = $this->original[$key][$part[0]];
322
            }
323
324
            foreach ($this->getMapper()->getPlugins() as $plugin) {
325
                $plugin->beforeRemove($instance, $this->space);
@@ 398-400 (lines=3) @@
395
            }
396
397
            $pk = [];
398
            foreach ($this->space->getPrimaryIndex()['parts'] as $part) {
399
                $pk[] = $this->original[$key][$part[0]];
400
            }
401
402
            $client->getSpace($this->space->getId())->update($pk, $operations);
403
            $this->original[$key] = $tuple;