Code Duplication    Length = 8-10 lines in 2 locations

lib/Service/PermissionService.php 2 locations

@@ 210-217 (lines=8) @@
207
		$acls = $this->aclMapper->findAll($boardId);
208
		/** @var Acl $acl */
209
		foreach ($acls as $acl) {
210
			if ($acl->getType() === Acl::PERMISSION_TYPE_USER) {
211
				$user = $this->userManager->get($acl->getParticipant());
212
				if ($user === null) {
213
					$this->logger->info('No user found for acl rule ' . $acl->getId());
214
					continue;
215
				}
216
				$users[$user->getUID()] = new User($user);
217
			}
218
			if ($acl->getType() === Acl::PERMISSION_TYPE_GROUP) {
219
				$group = $this->groupManager->get($acl->getParticipant());
220
				if ($group === null) {
@@ 218-227 (lines=10) @@
215
				}
216
				$users[$user->getUID()] = new User($user);
217
			}
218
			if ($acl->getType() === Acl::PERMISSION_TYPE_GROUP) {
219
				$group = $this->groupManager->get($acl->getParticipant());
220
				if ($group === null) {
221
					$this->logger->info('No group found for acl rule ' . $acl->getId());
222
					continue;
223
				}
224
				foreach ($group->getUsers() as $user) {
225
					$users[$user->getUID()] = new User($user);
226
				}
227
			}
228
		}
229
		$this->users[(string) $boardId] = $users;
230
		return $this->users[(string) $boardId];