Code Duplication    Length = 5-5 lines in 2 locations

src/Graviton/SchemaBundle/Constraint/RecordOriginConstraint.php 2 locations

@@ 125-129 (lines=5) @@
122
            $userObject = clone $data;
123
124
            foreach ($exceptions as $fieldName) {
125
                if ($accessor->isWritable($storedObject, $fieldName)) {
126
                    $accessor->setValue($storedObject, $fieldName, null);
127
                } else {
128
                    $this->addProperties($fieldName, $storedObject);
129
                }
130
                if ($accessor->isWritable($userObject, $fieldName)) {
131
                    $accessor->setValue($userObject, $fieldName, null);
132
                } else {
@@ 130-134 (lines=5) @@
127
                } else {
128
                    $this->addProperties($fieldName, $storedObject);
129
                }
130
                if ($accessor->isWritable($userObject, $fieldName)) {
131
                    $accessor->setValue($userObject, $fieldName, null);
132
                } else {
133
                    $this->addProperties($fieldName, $userObject);
134
                }
135
            }
136
137
            // so now all unimportant fields were set to null on both - they should match if rest is untouched ;-)