Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 175-182 (lines=8) @@
172
        }
173
174
        // Create names
175
        foreach ($content->versionInfo->names as $language => $name) {
176
            $this->contentGateway->setName(
177
                $content->versionInfo->contentInfo->id,
178
                $content->versionInfo->versionNo,
179
                $name,
180
                $language
181
            );
182
        }
183
184
        return $content;
185
    }
@@ 679-686 (lines=8) @@
676
                $this->fieldHandler->createNewFields($versionContent, $contentType);
677
678
                // Create names
679
                foreach ($versionContent->versionInfo->names as $language => $name) {
680
                    $this->contentGateway->setName(
681
                        $content->versionInfo->contentInfo->id,
682
                        $versionInfo->versionNo,
683
                        $name,
684
                        $language
685
                    );
686
                }
687
            }
688
689
            // Batch copy relations for all versions