Code Duplication    Length = 39-41 lines in 2 locations

eZ/Publish/Core/Event/Repository.php 1 location

@@ 84-122 (lines=39) @@
81
    /** @var \eZ\Publish\API\Repository\UserService */
82
    private $userService;
83
84
    public function __construct(
85
        RepositoryInterface $repository,
86
        BookmarkServiceInterface $bookmarkService,
87
        ContentServiceInterface $contentService,
88
        ContentTypeServiceInterface $contentTypeService,
89
        FieldTypeServiceInterface $fieldTypeService,
90
        LanguageServiceInterface $languageService,
91
        LocationServiceInterface $locationService,
92
        NotificationServiceInterface $notificationService,
93
        ObjectStateServiceInterface $objectStateService,
94
        RoleServiceInterface $roleService,
95
        SearchServiceInterface $searchService,
96
        SectionServiceInterface $sectionService,
97
        TrashServiceInterface $trashService,
98
        URLAliasServiceInterface $urlAliasService,
99
        URLServiceInterface $urlService,
100
        URLWildcardServiceInterface $urlWildcardService,
101
        UserPreferenceServiceInterface $userPreferenceService,
102
        UserServiceInterface $userService
103
    ) {
104
        $this->repository = $repository;
105
        $this->bookmarkService = $bookmarkService;
106
        $this->contentService = $contentService;
107
        $this->contentTypeService = $contentTypeService;
108
        $this->fieldTypeService = $fieldTypeService;
109
        $this->languageService = $languageService;
110
        $this->locationService = $locationService;
111
        $this->notificationService = $notificationService;
112
        $this->objectStateService = $objectStateService;
113
        $this->roleService = $roleService;
114
        $this->searchService = $searchService;
115
        $this->sectionService = $sectionService;
116
        $this->trashService = $trashService;
117
        $this->urlAliasService = $urlAliasService;
118
        $this->urlService = $urlService;
119
        $this->urlWildcardService = $urlWildcardService;
120
        $this->userPreferenceService = $userPreferenceService;
121
        $this->userService = $userService;
122
    }
123
124
    public function getCurrentUser(): User
125
    {

eZ/Publish/Core/SignalSlot/Repository.php 1 location

@@ 176-216 (lines=41) @@
173
     * @param \eZ\Publish\API\Repository\NotificationService $notificationService
174
     * @param \eZ\Publish\Core\SignalSlot\UserPreferenceService $userPreferenceService
175
     */
176
    public function __construct(
177
        RepositoryInterface $repository,
178
        SignalDispatcher $signalDispatcher,
179
        ContentService $contentService,
180
        ContentTypeService $contentTypeService,
181
        FieldTypeService $fieldTypeService,
182
        RoleService $roleService,
183
        ObjectStateService $objectStateService,
184
        URLWildcardService $urlWildcardService,
185
        URLAliasService $urlAliasService,
186
        UserService $userService,
187
        SearchService $searchService,
188
        SectionService $sectionService,
189
        TrashService $trashService,
190
        LocationService $locationService,
191
        LanguageService $languageService,
192
        URLService $urlService,
193
        BookmarkService $bookmarkService,
194
        NotificationService $notificationService,
195
        UserPreferenceService $userPreferenceService
196
    ) {
197
        $this->signalDispatcher = $signalDispatcher;
198
        $this->repository = $repository;
199
        $this->contentService = $contentService;
200
        $this->contentTypeService = $contentTypeService;
201
        $this->fieldTypeService = $fieldTypeService;
202
        $this->roleService = $roleService;
203
        $this->objectStateService = $objectStateService;
204
        $this->urlWildcardService = $urlWildcardService;
205
        $this->urlAliasService = $urlAliasService;
206
        $this->userService = $userService;
207
        $this->searchService = $searchService;
208
        $this->sectionService = $sectionService;
209
        $this->trashService = $trashService;
210
        $this->locationService = $locationService;
211
        $this->languageService = $languageService;
212
        $this->urlService = $urlService;
213
        $this->bookmarkService = $bookmarkService;
214
        $this->notificationService = $notificationService;
215
        $this->userPreferenceService = $userPreferenceService;
216
    }
217
218
    /**
219
     * @deprecated since 6.6, to be removed. Use PermissionResolver::getCurrentUserReference() instead.