Code Duplication    Length = 8-8 lines in 2 locations

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

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