diff --git a/lib/Db/RelationalEntity.php b/lib/Db/RelationalEntity.php index b4683b05b..683f1611f 100644 --- a/lib/Db/RelationalEntity.php +++ b/lib/Db/RelationalEntity.php @@ -127,7 +127,7 @@ class RelationalEntity extends Entity implements \JsonSerializable { } } - public function __call($methodName, $args) { + public function __call(string $methodName, array $args) { $attr = lcfirst(substr($methodName, 7)); if (array_key_exists($attr, $this->_resolvedProperties) && strpos($methodName, 'resolve') === 0) { if ($this->_resolvedProperties[$attr] !== null) { diff --git a/lib/Model/BoardSummary.php b/lib/Model/BoardSummary.php index 365a454c0..7924222ba 100644 --- a/lib/Model/BoardSummary.php +++ b/lib/Model/BoardSummary.php @@ -39,7 +39,7 @@ class BoardSummary extends Board { ]; } - protected function getter($name) { + protected function getter(string $name): mixed { return $this->board->getter($name); } diff --git a/lib/Model/CardDetails.php b/lib/Model/CardDetails.php index d894c274e..ca39b9211 100644 --- a/lib/Model/CardDetails.php +++ b/lib/Model/CardDetails.php @@ -81,10 +81,11 @@ class CardDetails extends Card { $array['board'] = (new BoardSummary($this->board))->jsonSerialize(); } - protected function getter($name) { + protected function getter(string $name): mixed { return $this->card->getter($name); } - public function __call($name, $arguments) { - return $this->card->__call($name, $arguments); + + public function __call(string $methodName, array $args) { + return $this->card->__call($methodName, $args); } } diff --git a/tests/psalm-baseline.xml b/tests/psalm-baseline.xml index 2eb5d9228..1fed3db61 100644 --- a/tests/psalm-baseline.xml +++ b/tests/psalm-baseline.xml @@ -1,40 +1,40 @@ - + - + $types - + void - + $this->boardMapper $this->stackMapper - + $this->boardMapper $this->stackMapper - + $modified === null $modified === null - + Util - + $this->userId - + $this->userId - + $cardId $cardId $cardId @@ -44,95 +44,108 @@ - + LoadSidebar - + $modified !== null - + Util - + ExternalCalendar - + ICalendarObject - + ICalendarProvider - + NotFound - + VCalendar VCalendar - + $entity->getId() - + getUserIdGroups - + $labelId - - - $attribute - - - + VCalendar VCalendar + + + public function __construct(Board $board) { + public function __construct(Board $board) { + + + + + public function __construct(Card $card, ?Board $board = null) { + public function __construct(Card $card, ?Board $board = null) { + + - + + try { + $attachment = $this->attachmentMapper->find($attachmentId); + } catch (IMapperException $e) { + throw new NoPermissionException('Permission denied'); + } + - + findAll findAll - + $member !== null - + is_resource($content) is_resource($content) - + getShareByToken - + [self::class, 'listenPreShare']