Code Duplication    Length = 3-5 lines in 2 locations

src/Repository.php 2 locations

@@ 178-180 (lines=3) @@
175
176
        $this->original[$key] = $tuple;
177
178
        foreach ($this->space->getFormat() as $index => $info) {
179
            $instance->{$info['name']} = array_key_exists($index, $tuple) ? $tuple[$index] : null;
180
        }
181
182
        $this->keys->offsetSet($instance, $key);
183
@@ 221-225 (lines=5) @@
218
        $client = $this->getMapper()->getClient();
219
        $result = $client->getSpace($this->space->getId())->update($pk, $tupleOperations);
220
        foreach ($result->getData() as $tuple) {
221
            foreach ($this->space->getFormat() as $index => $info) {
222
                if (array_key_exists($index, $tuple)) {
223
                    $instance->{$info['name']} = $tuple[$index];
224
                }
225
            }
226
        }
227
    }
228