Fix scritinizer issues

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2017-10-03 18:48:06 +02:00
committed by Julius Härtl
parent 3c2ee00ad7
commit ac1b1e826f
2 changed files with 7 additions and 3 deletions

View File

@@ -35,7 +35,7 @@ class CardMapper extends DeckMapper implements IPermissionMapper {
private $labelMapper;
/** @var IUserManager */
private $userManager;
/** @var Manager */
/** @var IManager */
private $notificationManager;
public function __construct(

View File

@@ -184,14 +184,18 @@ class PermissionService {
* Required to allow assigning them to cards
*
* @param $boardId
* @return array|null
* @return array
*/
public function findUsers($boardId) {
// cache users of a board so we don't query them for every cards
if (array_key_exists((string)$boardId, $this->users)) {
return $this->users[(string)$boardId];
}
$board = $this->boardMapper->find($boardId);
try {
$board = $this->boardMapper->find($boardId);
} catch (DoesNotExistException $e) {
return [];
}
$users = [
new User($this->userManager->get($board->getOwner()))
];