Code Duplication    Length = 6-6 lines in 2 locations

lib/Service/SharingFrameService.php 1 location

@@ 119-124 (lines=6) @@
116
		MiscService $miscService
117
	) {
118
119
		if ($userId === null) {
120
			$user = $userSession->getUser();
121
			if ($user !== null) {
122
				$userId = $user->getUID();
123
			}
124
		}
125
126
		$this->userId = $userId;
127
		$this->urlGenerator = $urlGenerator;

lib/Service/CirclesService.php 1 location

@@ 144-149 (lines=6) @@
141
		MiscService $miscService
142
	) {
143
144
		if ($userId === null) {
145
			$user = $userSession->getUser();
146
			if ($user !== null) {
147
				$userId = $user->getUID();
148
			}
149
		}
150
151
		$this->userId = $userId;
152
		$this->l10n = $l10n;