Code Duplication    Length = 4-7 lines in 2 locations

UnitOfWork.php 2 locations

@@ 913-916 (lines=4) @@
910
            $this->originalEntityData[$oid] = $actualData;
911
            $changeSet                      = [];
912
            foreach ($actualData as $propName => $actualValue) {
913
                if (!$class->hasAssociation($propName)) {
914
                    $changeSet[$propName] = [null, $actualValue];
915
                    continue;
916
                }
917
                $assoc = $class->getAssociationMapping($propName);
918
                if ($assoc['isOwningSide'] && $assoc['type'] & ApiMetadata::TO_ONE) {
919
                    $changeSet[$propName] = [null, $actualValue];
@@ 942-948 (lines=7) @@
939
                    continue;
940
                }
941
                // if regular field
942
                if (!$class->hasAssociation($propName)) {
943
                    if ($isChangeTrackingNotify) {
944
                        continue;
945
                    }
946
                    $changeSet[$propName] = [$orgValue, $actualValue];
947
                    continue;
948
                }
949
                $assoc = $class->getAssociationMapping($propName);
950
                // Persistent collection was exchanged with the "originally"
951
                // created one. This can only mean it was cloned and replaced