Code Duplication    Length = 5-5 lines in 2 locations

Core/Executor/UserGroupManager.php 1 location

@@ 53-57 (lines=5) @@
50
            $userGroupCreateStruct->setField('description', $this->dsl['description']);
51
        }
52
53
        if (isset($this->dsl['section'])) {
54
            $sectionKey = $this->referenceResolver->resolveReference($this->dsl['section']);
55
            $section = $this->sectionMatcher->matchOneByKey($sectionKey);
56
            $userGroupCreateStruct->sectionId = $section->id;
57
        }
58
59
        $userGroup = $userService->createUserGroup($userGroupCreateStruct, $parentGroup);
60

Core/Executor/ContentManager.php 1 location

@@ 86-90 (lines=5) @@
83
            $contentCreateStruct->remoteId = $this->dsl['remote_id'];
84
        }
85
86
        if (isset($this->dsl['section'])) {
87
            $sectionKey = $this->referenceResolver->resolveReference($this->dsl['section']);
88
            $section = $this->sectionMatcher->matchOneByKey($sectionKey);
89
            $contentCreateStruct->sectionId = $section->id;
90
        }
91
92
        if (isset($this->dsl['owner'])) {
93
            $owner = $this->getUser($this->dsl['owner']);