Code Duplication    Length = 4-4 lines in 2 locations

src/Repository.php 2 locations

@@ 58-61 (lines=4) @@
55
                    }
56
                }
57
            }
58
            if (!$this->type->hasProperty($k)) {
59
                $name = $this->type->getName();
60
                throw new Exception("Unknown property $name.$k");
61
            }
62
            $data[$k] = $this->type->encodeProperty($k, $v);
63
        }
64
        foreach ($this->type->getRequiredProperties() as $property) {
@@ 231-234 (lines=4) @@
228
            }
229
230
            foreach ($changes as $k => $v) {
231
                if (!$this->type->hasProperty($k)) {
232
                    $name = $this->type->getName();
233
                    throw new Exception("Unknown property $name.$k");
234
                }
235
            }
236
237
            if (count($changes)) {