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
    }
@@ 728-735 (lines=8) @@
725
                $this->fieldHandler->createNewFields($versionContent, $contentType);
726
727
                // Create names
728
                foreach ($versionContent->versionInfo->names as $language => $name) {
729
                    $this->contentGateway->setName(
730
                        $content->versionInfo->contentInfo->id,
731
                        $versionInfo->versionNo,
732
                        $name,
733
                        $language
734
                    );
735
                }
736
            }
737
738
            // Batch copy relations for all versions