Code Duplication    Length = 8-10 lines in 2 locations

lib/Service/PermissionService.php 2 locations

@@ 246-253 (lines=8) @@
243
		$acls = $this->aclMapper->findAll($boardId);
244
		/** @var Acl $acl */
245
		foreach ($acls as $acl) {
246
			if ($acl->getType() === Acl::PERMISSION_TYPE_USER) {
247
				$user = $this->userManager->get($acl->getParticipant());
248
				if ($user === null) {
249
					$this->logger->info('No user found for acl rule ' . $acl->getId());
250
					continue;
251
				}
252
				$users[$user->getUID()] = new User($user);
253
			}
254
			if ($acl->getType() === Acl::PERMISSION_TYPE_GROUP) {
255
				$group = $this->groupManager->get($acl->getParticipant());
256
				if ($group === null) {
@@ 254-263 (lines=10) @@
251
				}
252
				$users[$user->getUID()] = new User($user);
253
			}
254
			if ($acl->getType() === Acl::PERMISSION_TYPE_GROUP) {
255
				$group = $this->groupManager->get($acl->getParticipant());
256
				if ($group === null) {
257
					$this->logger->info('No group found for acl rule ' . $acl->getId());
258
					continue;
259
				}
260
				foreach ($group->getUsers() as $user) {
261
					$users[$user->getUID()] = new User($user);
262
				}
263
			}
264
		}
265
		$this->users[(string) $boardId] = $users;
266
		return $this->users[(string) $boardId];