Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 333-339 (lines=7) @@
330
            )
331
        );
332
333
        if ($updateStruct->sectionId !== null) {
334
            $section = $this->sectionService->loadSection($updateStruct->sectionId);
335
            $this->sectionService->assignSection(
336
                $userGroup->getVersionInfo()->getContentInfo(),
337
                $section
338
            );
339
        }
340
341
        $updatedGroup = $this->userService->updateUserGroup($userGroup, $updateStruct->userGroupUpdateStruct);
342
        $contentType = $this->contentTypeService->loadContentType(
@@ 377-383 (lines=7) @@
374
            )
375
        );
376
377
        if ($updateStruct->sectionId !== null) {
378
            $section = $this->sectionService->loadSection($updateStruct->sectionId);
379
            $this->sectionService->assignSection(
380
                $user->getVersionInfo()->getContentInfo(),
381
                $section
382
            );
383
        }
384
385
        $updatedUser = $this->userService->updateUser($user, $updateStruct->userUpdateStruct);
386
        $updatedContentInfo = $updatedUser->getVersionInfo()->getContentInfo();