Code Duplication    Length = 8-8 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Content/Handler.php 2 locations

@@ 187-194 (lines=8) @@
184
        }
185
186
        // Create names
187
        foreach ($content->versionInfo->names as $language => $name) {
188
            $this->contentGateway->setName(
189
                $content->versionInfo->contentInfo->id,
190
                $content->versionInfo->versionNo,
191
                $name,
192
                $language
193
            );
194
        }
195
196
        return $content;
197
    }
@@ 718-725 (lines=8) @@
715
                $this->fieldHandler->createNewFields($versionContent, $contentType);
716
717
                // Create names
718
                foreach ($versionContent->versionInfo->names as $language => $name) {
719
                    $this->contentGateway->setName(
720
                        $content->versionInfo->contentInfo->id,
721
                        $versionInfo->versionNo,
722
                        $name,
723
                        $language
724
                    );
725
                }
726
            }
727
728
            // Batch copy relations for all versions