Code Duplication    Length = 7-7 lines in 2 locations

eZ/Publish/Core/REST/Server/Controller/User.php 2 locations

@@ 339-345 (lines=7) @@
336
            )
337
        );
338
339
        if ($updateStruct->sectionId !== null) {
340
            $section = $this->sectionService->loadSection($updateStruct->sectionId);
341
            $this->sectionService->assignSection(
342
                $userGroup->getVersionInfo()->getContentInfo(),
343
                $section
344
            );
345
        }
346
347
        $updatedGroup = $this->userService->updateUserGroup($userGroup, $updateStruct->userGroupUpdateStruct);
348
        $contentType = $this->contentTypeService->loadContentType(
@@ 383-389 (lines=7) @@
380
            )
381
        );
382
383
        if ($updateStruct->sectionId !== null) {
384
            $section = $this->sectionService->loadSection($updateStruct->sectionId);
385
            $this->sectionService->assignSection(
386
                $user->getVersionInfo()->getContentInfo(),
387
                $section
388
            );
389
        }
390
391
        $updatedUser = $this->userService->updateUser($user, $updateStruct->userUpdateStruct);
392
        $updatedContentInfo = $updatedUser->getVersionInfo()->getContentInfo();