Code Duplication    Length = 5-5 lines in 2 locations

src/Repository.php 2 locations

@@ 325-329 (lines=5) @@
322
            $tuple = $this->getTuple($instance);
323
            $update = [];
324
325
            foreach ($tuple as $i => $v) {
326
                if (!array_key_exists($i, $this->original[$key]) || $v !== $this->original[$key][$i]) {
327
                    $update[$i] = $v;
328
                }
329
            }
330
331
            if (!count($update)) {
332
                return $instance;
@@ 346-350 (lines=5) @@
343
            $tuple = $this->getTuple($instance);
344
            $update = [];
345
346
            foreach ($tuple as $i => $v) {
347
                if (!array_key_exists($i, $this->original[$key]) || $v !== $this->original[$key][$i]) {
348
                    $update[$i] = $v;
349
                }
350
            }
351
352
            if (!count($update)) {
353
                return $instance;