Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 196-203 (lines=8) @@
193
        }
194
195
        // Create names
196
        foreach ($content->versionInfo->names as $language => $name) {
197
            $this->contentGateway->setName(
198
                $content->versionInfo->contentInfo->id,
199
                $content->versionInfo->versionNo,
200
                $name,
201
                $language
202
            );
203
        }
204
205
        return $content;
206
    }
@@ 768-775 (lines=8) @@
765
                $this->fieldHandler->createNewFields($versionContent, $contentType);
766
767
                // Create names
768
                foreach ($versionContent->versionInfo->names as $language => $name) {
769
                    $this->contentGateway->setName(
770
                        $content->versionInfo->contentInfo->id,
771
                        $versionInfo->versionNo,
772
                        $name,
773
                        $language
774
                    );
775
                }
776
            }
777
778
            // Batch copy relations for all versions