Code Duplication    Length = 7-7 lines in 2 locations

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

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