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; private $labelMapper;
/** @var IUserManager */ /** @var IUserManager */
private $userManager; private $userManager;
/** @var Manager */ /** @var IManager */
private $notificationManager; private $notificationManager;
public function __construct( public function __construct(

View File

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