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
    }
@@ 691-698 (lines=8) @@
688
                $this->fieldHandler->createNewFields($versionContent, $contentType);
689
690
                // Create names
691
                foreach ($versionContent->versionInfo->names as $language => $name) {
692
                    $this->contentGateway->setName(
693
                        $content->versionInfo->contentInfo->id,
694
                        $versionInfo->versionNo,
695
                        $name,
696
                        $language
697
                    );
698
                }
699
            }
700
701
            // Batch copy relations for all versions