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
@@ 236-240 (lines=5) @@
233
        $client = $this->getMapper()->getClient();
234
        $result = $client->getSpace($this->space->getId())->update($pk, $tupleOperations);
235
        foreach ($result->getData() as $tuple) {
236
            foreach ($this->space->getFormat() as $index => $info) {
237
                if (array_key_exists($index, $tuple)) {
238
                    $instance->{$info['name']} = $tuple[$index];
239
                }
240
            }
241
        }
242
    }
243