Code Duplication    Length = 3-5 lines in 2 locations

src/Repository.php 2 locations

@@ 202-204 (lines=3) @@
199
200
        $this->original[$key] = $tuple;
201
202
        foreach ($this->space->getFormat() as $index => $info) {
203
            $instance->{$info['name']} = array_key_exists($index, $tuple) ? $tuple[$index] : null;
204
        }
205
206
        $this->keys->offsetSet($instance, $key);
207
@@ 250-254 (lines=5) @@
247
        $client = $this->getMapper()->getClient();
248
        $result = $client->getSpace($this->space->getId())->update($pk, $tupleOperations);
249
        foreach ($result->getData() as $tuple) {
250
            foreach ($this->space->getFormat() as $index => $info) {
251
                if (array_key_exists($index, $tuple)) {
252
                    $instance->{$info['name']} = $tuple[$index];
253
                }
254
            }
255
        }
256
    }
257