Use numeric typehint instead of int to allow for numeric strings to be passed to find methods. Fixes the psalm check.

Signed-off-by: Raul <raul@nextcloud.com>
This commit is contained in:
Raul
2022-04-13 12:39:39 +02:00
parent 53e3a7ae7f
commit 815b8597d1
4 changed files with 18 additions and 21 deletions

View File

@@ -35,7 +35,7 @@ class AclMapper extends DeckMapper implements IPermissionMapper {
} }
/** /**
* @param int $boardId * @param numeric $boardId
* @param int|null $limit * @param int|null $limit
* @param int|null $offset * @param int|null $offset
* @return Acl[] * @return Acl[]
@@ -53,8 +53,8 @@ class AclMapper extends DeckMapper implements IPermissionMapper {
} }
/** /**
* @param int $userId * @param numeric $userId
* @param int $aclId * @param numeric $aclId
* @return bool * @return bool
* @throws \OCP\DB\Exception * @throws \OCP\DB\Exception
*/ */
@@ -70,7 +70,7 @@ class AclMapper extends DeckMapper implements IPermissionMapper {
} }
/** /**
* @param int $id * @param numeric $id
* @return int|null * @return int|null
*/ */
public function findBoardId($id): ?int { public function findBoardId($id): ?int {

View File

@@ -55,9 +55,6 @@ class AssignmentMapper extends QBMapper implements IPermissionMapper {
$this->circleService = $circleService; $this->circleService = $circleService;
} }
/**
* @return Assignment[]
*/
public function findAll(int $cardId): array { public function findAll(int $cardId): array {
$qb = $this->db->getQueryBuilder(); $qb = $this->db->getQueryBuilder();
$qb->select('*') $qb->select('*')

View File

@@ -36,7 +36,7 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
} }
/** /**
* @param int $boardId * @param numeric $boardId
* @param int|null $limit * @param int|null $limit
* @param int|null $offset * @param int|null $offset
* @return Label[] * @return Label[]
@@ -65,7 +65,7 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
} }
/** /**
* @param int $cardId * @param numeric $cardId
* @param int|null $limit * @param int|null $limit
* @param int|null $offset * @param int|null $offset
* @return Label[] * @return Label[]
@@ -85,7 +85,7 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
} }
/** /**
* @param int $boardId * @param numeric $boardId
* @param int|null $limit * @param int|null $limit
* @param int|null $offset * @param int|null $offset
* @return Label[] * @return Label[]
@@ -130,7 +130,7 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
} }
/** /**
* @param int $boardId * @param numeric $boardId
* @return array * @return array
* @throws \OCP\DB\Exception * @throws \OCP\DB\Exception
*/ */
@@ -147,7 +147,7 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
} }
/** /**
* @param int $labelId * @param numeric $labelId
* @return void * @return void
* @throws \OCP\DB\Exception * @throws \OCP\DB\Exception
*/ */
@@ -159,7 +159,7 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
} }
/** /**
* @param int $cardId * @param numeric $cardId
* @return void * @return void
* @throws \OCP\DB\Exception * @throws \OCP\DB\Exception
*/ */
@@ -172,7 +172,7 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
/** /**
* @param string $userId * @param string $userId
* @param int $labelId * @param numeric $labelId
* @return bool * @return bool
* @throws \OCP\DB\Exception * @throws \OCP\DB\Exception
*/ */
@@ -188,7 +188,7 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
} }
/** /**
* @param int $id * @param numeric $id
* @return int|null * @return int|null
*/ */
public function findBoardId($id): ?int { public function findBoardId($id): ?int {

View File

@@ -39,7 +39,7 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
/** /**
* @param int $id * @param numeric $id
* @return Stack * @return Stack
* @throws DoesNotExistException * @throws DoesNotExistException
* @throws MultipleObjectsReturnedException * @throws MultipleObjectsReturnedException
@@ -75,7 +75,7 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
} }
/** /**
* @param int $boardId * @param numeric $boardId
* @param int|null $limit * @param int|null $limit
* @param int|null $offset * @param int|null $offset
* @return Stack[] * @return Stack[]
@@ -94,7 +94,7 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
} }
/** /**
* @param int $boardId * @param numeric $boardId
* @param int|null $limit * @param int|null $limit
* @param int|null $offset * @param int|null $offset
* @return Stack[] * @return Stack[]
@@ -124,8 +124,8 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
} }
/** /**
* @param int $userId * @param numeric $userId
* @param int $stackId * @param numeric $stackId
* @return bool * @return bool
* @throws \OCP\DB\Exception * @throws \OCP\DB\Exception
*/ */
@@ -141,7 +141,7 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
} }
/** /**
* @param $id * @param numeric $id
* @return int|null * @return int|null
* @throws \OCP\DB\Exception * @throws \OCP\DB\Exception
*/ */