Code Duplication    Length = 3-5 lines in 2 locations

src/Repository.php 2 locations

@@ 193-195 (lines=3) @@
190
191
        $this->original[$key] = $tuple;
192
193
        foreach ($this->space->getFormat() as $index => $info) {
194
            $instance->{$info['name']} = array_key_exists($index, $tuple) ? $tuple[$index] : null;
195
        }
196
197
        $this->keys->offsetSet($instance, $key);
198
@@ 241-245 (lines=5) @@
238
        $client = $this->getMapper()->getClient();
239
        $result = $client->getSpace($this->space->getId())->update($pk, $tupleOperations);
240
        foreach ($result->getData() as $tuple) {
241
            foreach ($this->space->getFormat() as $index => $info) {
242
                if (array_key_exists($index, $tuple)) {
243
                    $instance->{$info['name']} = $tuple[$index];
244
                }
245
            }
246
        }
247
    }
248