deck
deck copied to clipboard
Improve exception handling in controllers
As reported by @stefan-niedermann and @desperateCoder as major integrators of the API endpoints in #3384 the API is lacking a lot in proper responses in case of errors that may occur due to uncatched exceptions.
In order to address this, psalm is able to generate a report of uncatched exceptions that are not annotated or catched:
diff --git a/psalm.xml b/psalm.xml
index b171e862..5d251744 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -2,6 +2,7 @@
<psalm
errorLevel="4"
resolveFromConfigFile="true"
+ checkForThrowsDocblock="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
In addition we should check alrea
Full list of the psalm check on current master
ERROR: MissingThrowsDocblock - lib/Activity/ActivityManager.php:503:3 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new InvalidArgumentException('No entity relation present for '. $className . ' to ' . $objectType);
ERROR: MissingThrowsDocblock - lib/Activity/ActivityManager.php:507:32 - OCP\AppFramework\Db\MultipleObjectsReturnedException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$stack = $this->stackMapper->find($stackId);
ERROR: MissingThrowsDocblock - lib/Activity/ActivityManager.php:508:32 - OCP\AppFramework\Db\MultipleObjectsReturnedException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$board = $this->boardMapper->find($stack->getBoardId());
ERROR: MissingThrowsDocblock - lib/Activity/ActivityManager.php:517:32 - OCP\AppFramework\Db\MultipleObjectsReturnedException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$stack = $this->stackMapper->find($card->getStackId());
ERROR: MissingThrowsDocblock - lib/Activity/ActivityManager.php:518:32 - OCP\AppFramework\Db\MultipleObjectsReturnedException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$board = $this->boardMapper->find($stack->getBoardId());
ERROR: MissingThrowsDocblock - lib/Activity/ActivityManager.php:539:28 - OCP\AppFramework\Db\MultipleObjectsReturnedException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$acl = $this->aclMapper->find($aclId);
ERROR: MissingThrowsDocblock - lib/Activity/ActivityManager.php:540:32 - OCP\AppFramework\Db\MultipleObjectsReturnedException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$board = $this->boardMapper->find($acl->getBoardId());
ERROR: MissingThrowsDocblock - lib/Activity/DeckProvider.php:177:11 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$event->setParsedSubject(str_replace($placeholders, $replacements, $subject))
ERROR: MissingThrowsDocblock - lib/Activity/DeckProvider.php:178:6 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setRichSubject($subject, $richParameters);
ERROR: MissingThrowsDocblock - lib/Activity/DeckProvider.php:179:11 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$event->setSubject($subject, $parameters);
ERROR: MissingThrowsDocblock - lib/Activity/DeckProvider.php:183:11 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('deck', 'deck-dark.svg')));
ERROR: MissingThrowsDocblock - lib/Activity/DeckProvider.php:185:12 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('files', 'change.svg')));
ERROR: MissingThrowsDocblock - lib/Activity/DeckProvider.php:188:12 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('files', 'add-color.svg')));
ERROR: MissingThrowsDocblock - lib/Activity/DeckProvider.php:191:12 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('files', 'delete-color.svg')));
ERROR: MissingThrowsDocblock - lib/Activity/DeckProvider.php:194:12 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('deck', 'archive.svg')));
ERROR: MissingThrowsDocblock - lib/Activity/DeckProvider.php:197:12 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/history.svg')));
ERROR: MissingThrowsDocblock - lib/Activity/DeckProvider.php:200:12 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'places/files.svg')));
ERROR: MissingThrowsDocblock - lib/Activity/DeckProvider.php:203:12 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/comment.svg')));
ERROR: MissingThrowsDocblock - lib/Activity/DeckProvider.php:206:12 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/tag.svg')));
ERROR: MissingThrowsDocblock - lib/Activity/DeckProvider.php:293:13 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$event->setParsedMessage($comment->getMessage());
ERROR: MissingThrowsDocblock - lib/AppInfo/Application.php:92:13 - Psr\Container\ContainerExceptionInterface is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$context->injectFn(Closure::fromCallable([$this, 'registerUserGroupHooks']));
ERROR: MissingThrowsDocblock - lib/AppInfo/Application.php:93:13 - Psr\Container\ContainerExceptionInterface is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$context->injectFn(Closure::fromCallable([$this, 'registerCommentsEntity']));
ERROR: MissingThrowsDocblock - lib/AppInfo/Application.php:94:13 - Psr\Container\ContainerExceptionInterface is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$context->injectFn(Closure::fromCallable([$this, 'registerCommentsEventHandler']));
ERROR: MissingThrowsDocblock - lib/AppInfo/Application.php:95:13 - Psr\Container\ContainerExceptionInterface is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$context->injectFn(Closure::fromCallable([$this, 'registerNotifications']));
ERROR: MissingThrowsDocblock - lib/AppInfo/Application.php:96:13 - Psr\Container\ContainerExceptionInterface is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$context->injectFn(Closure::fromCallable([$this, 'registerCollaborationResources']));
ERROR: MissingThrowsDocblock - lib/AppInfo/Application.php:98:13 - Psr\Container\ContainerExceptionInterface is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$context->injectFn(function (IManager $shareManager) {
ERROR: MissingThrowsDocblock - lib/AppInfo/Application.php:102:13 - Psr\Container\ContainerExceptionInterface is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$context->injectFn(function (Listener $listener, IEventDispatcher $eventDispatcher) {
ERROR: MissingThrowsDocblock - lib/AppInfo/Application.php:109:4 - Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new Exception('Cannot include autoload. Did you run install dependencies using composer?');
ERROR: MissingThrowsDocblock - lib/Collaboration/Resources/ResourceProviderCard.php:88:4 - OCP\Collaboration\Resources\ResourceException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new ResourceException('No card found for resource');
ERROR: MissingThrowsDocblock - lib/Collaboration/Resources/ResourceProviderCard.php:90:4 - OCP\Collaboration\Resources\ResourceException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new ResourceException('No unique card found for resource, this should never happen');
ERROR: MissingDependency - lib/Command/AttachmentMigrate.php:46:10 - OCP\Files\IRootFolder depends on class or interface oc\hooks\emitter that does not exist (see https://psalm.dev/157)
* @var IRootFolder
ERROR: MissingDependency - lib/Command/AttachmentMigrate.php:54:66 - OCP\Files\IRootFolder depends on class or interface oc\hooks\emitter that does not exist (see https://psalm.dev/157)
public function __construct(AttachmentMapper $attachmentMapper, IRootFolder $rootFolder, IConfig $config) {
ERROR: MissingThrowsDocblock - lib/Command/AttachmentMigrate.php:64:6 - Symfony\Component\Console\Exception\InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setName('deck:migrate-attachments')
ERROR: MissingThrowsDocblock - lib/Command/AttachmentMigrate.php:66:6 - Symfony\Component\Console\Exception\InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->addOption(
ERROR: InvalidReturnType - lib/Command/AttachmentMigrate.php:78:78 - Not all code paths of OCA\Deck\Command\AttachmentMigrate::execute end in a return statement, return type int expected (see https://psalm.dev/011)
protected function execute(InputInterface $input, OutputInterface $output): int {
ERROR: MissingThrowsDocblock - lib/Command/AttachmentMigrate.php:79:23 - Symfony\Component\Console\Exception\InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$listOnly = $input->getOption('list');
ERROR: UndefinedMethod - lib/Command/AttachmentMigrate.php:80:76 - Method OCA\Deck\Db\AttachmentMapper::getLegacyAttachmentCount does not exist (see https://psalm.dev/022)
$output->writeln('Found legacy attachments: ' . $this->attachmentMapper->getLegacyAttachmentCount());
ERROR: UndefinedMethod - lib/Command/AttachmentMigrate.php:86:43 - Method OCA\Deck\Db\AttachmentMapper::getLegacyAttachments does not exist (see https://psalm.dev/022)
$attachments = $this->attachmentMapper->getLegacyAttachments();
ERROR: MissingDependency - lib/Command/AttachmentMigrate.php:93:19 - OCP\Files\IRootFolder depends on class or interface oc\hooks\emitter that does not exist (see https://psalm.dev/157)
$userFolder = $this->rootFolder
ERROR: MissingDependency - lib/Command/AttachmentMigrate.php:101:14 - OCP\Files\IRootFolder depends on class or interface oc\hooks\emitter that does not exist (see https://psalm.dev/157)
$source = $this->rootFolder->get("appdata_$instanceId/deck/$folderName/$fileName");
ERROR: UndefinedInterfaceMethod - lib/Command/AttachmentMigrate.php:102:29 - Method OCP\Files\Node::getNonExistingName does not exist (see https://psalm.dev/181)
$fileName = $userFolder->getNonExistingName($fileName);
ERROR: MissingThrowsDocblock - lib/Command/UserExport.php:54:3 - Symfony\Component\Console\Exception\LogicException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
parent::__construct();
ERROR: MissingThrowsDocblock - lib/Command/UserExport.php:68:6 - Symfony\Component\Console\Exception\InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setName('deck:export')
ERROR: MissingThrowsDocblock - lib/Command/UserExport.php:70:6 - Symfony\Component\Console\Exception\InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->addArgument(
ERROR: MissingThrowsDocblock - lib/Command/UserExport.php:87:21 - Symfony\Component\Console\Exception\InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$userId = $input->getArgument('user-id');
ERROR: MissingThrowsDocblock - lib/Controller/AttachmentController.php:44:36 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
return $this->attachmentService->findAll($cardId, true);
ERROR: MissingThrowsDocblock - lib/Controller/AttachmentController.php:61:36 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
return $this->attachmentService->display($cardId, $attachmentId, $type);
ERROR: MissingThrowsDocblock - lib/Controller/AttachmentController.php:68:36 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
return $this->attachmentService->create(
ERROR: MissingThrowsDocblock - lib/Controller/AttachmentController.php:84:36 - OCA\Deck\BadRequestException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
return $this->attachmentService->update($cardId, $attachmentId, $this->request->getParam('data'), $type);
ERROR: MissingThrowsDocblock - lib/Controller/AttachmentController.php:96:36 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
return $this->attachmentService->delete($cardId, $attachmentId, $type);
ERROR: MissingThrowsDocblock - lib/DAV/DeckCalendarBackend.php:79:23 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->boardMapper->update($board);
ERROR: MissingThrowsDocblock - lib/Db/AttachmentMapper.php:92:4 - OCP\AppFramework\Db\DoesNotExistException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new DoesNotExistException('Did expect one result but found none when executing' . $qb);
ERROR: MissingThrowsDocblock - lib/Db/BoardMapper.php:309:19 - OCP\AppFramework\Db\MultipleObjectsReturnedException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$board = $this->find($boardId);
ERROR: MissingThrowsDocblock - lib/Db/CardMapper.php:117:10 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
return parent::update($cardUpdate);
ERROR: MissingThrowsDocblock - lib/Db/CardMapper.php:128:18 - OCP\AppFramework\Db\DoesNotExistException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$card = $this->findEntity($qb);
ERROR: MissingThrowsDocblock - lib/Db/CardMapper.php:309:18 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$result = $qb->execute();
ERROR: MissingThrowsDocblock - lib/Db/CardMapper.php:353:18 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$result = $qb->execute();
ERROR: MissingThrowsDocblock - lib/Db/CardMapper.php:502:18 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$result = $qb->execute();
ERROR: MissingThrowsDocblock - lib/Db/CardMapper.php:529:8 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$qb->execute();
ERROR: MissingThrowsDocblock - lib/Db/CardMapper.php:537:8 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$qb->execute();
ERROR: MissingThrowsDocblock - lib/Db/CardMapper.php:542:22 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$stmt = $this->db->prepare($sql);
ERROR: MissingThrowsDocblock - lib/Db/CardMapper.php:543:10 - Doctrine\DBAL\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$stmt->bindParam(1, $cardId, \PDO::PARAM_INT);
ERROR: MissingThrowsDocblock - lib/Db/CardMapper.php:544:10 - Doctrine\DBAL\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$stmt->execute();
ERROR: MissingThrowsDocblock - lib/Db/CardMapper.php:551:22 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$stmt = $this->db->prepare($sql);
ERROR: MissingThrowsDocblock - lib/Db/CardMapper.php:552:10 - Doctrine\DBAL\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$stmt->bindParam(1, $id, \PDO::PARAM_INT);
ERROR: MissingThrowsDocblock - lib/Db/CardMapper.php:553:10 - Doctrine\DBAL\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$stmt->execute();
ERROR: MissingThrowsDocblock - lib/Db/RelationalEntity.php:123:4 - Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new \Exception('resolver must return an instance of RelationalObject');
ERROR: MissingThrowsDocblock - lib/Db/RelationalObject.php:44:11 - Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->getObjectSerialization()
ERROR: MissingThrowsDocblock - lib/Listeners/BeforeTemplateRenderedListener.php:52:31 - Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$pathInfo = $this->request->getPathInfo();
ERROR: MissingThrowsDocblock - lib/Listeners/FullTextSearchEventListener.php:58:31 - Psr\Container\NotFoundExceptionInterface is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->logger = $container->get(LoggerInterface::class);
ERROR: MissingThrowsDocblock - lib/Listeners/FullTextSearchEventListener.php:60:33 - Psr\Container\NotFoundExceptionInterface is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->manager = $container->get(IFullTextSearchManager::class);
ERROR: MissingThrowsDocblock - lib/Listeners/FullTextSearchEventListener.php:61:33 - Psr\Container\NotFoundExceptionInterface is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->service = $container->get(FullTextSearchService::class);
ERROR: MissingThrowsDocblock - lib/Migration/Version1000Date20200308073933.php:20:21 - Doctrine\DBAL\Schema\SchemaException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$table = $schema->getTable('deck_assigned_users');
ERROR: MissingThrowsDocblock - lib/Migration/Version10200Date20201111150114.php:18:21 - Doctrine\DBAL\Schema\SchemaException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$table = $schema->getTable('deck_assigned_users');
ERROR: MissingThrowsDocblock - lib/Migration/Version10200Date20201111150114.php:28:21 - Doctrine\DBAL\Schema\SchemaException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$table = $schema->getTable('deck_labels');
ERROR: MissingThrowsDocblock - lib/Migration/Version10200Date20201111150114.php:39:21 - Doctrine\DBAL\Schema\SchemaException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$table = $schema->getTable('deck_cards');
ERROR: MissingThrowsDocblock - lib/Migration/Version10200Date20201111150114.php:54:21 - Doctrine\DBAL\Schema\SchemaException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$table = $schema->getTable('deck_boards');
ERROR: MissingThrowsDocblock - lib/Migration/Version10200Date20201111150114.php:62:21 - Doctrine\DBAL\Schema\SchemaException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$table = $schema->getTable('deck_stacks');
ERROR: MissingThrowsDocblock - lib/Migration/Version10200Date20201111150114.php:73:21 - Doctrine\DBAL\Schema\SchemaException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$table = $schema->getTable('deck_stacks');
ERROR: MissingThrowsDocblock - lib/Migration/Version10200Date20201111150114.php:85:21 - Doctrine\DBAL\Schema\SchemaException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$table = $schema->getTable('deck_cards');
ERROR: MissingThrowsDocblock - lib/Migration/Version10200Date20201111150114.php:95:21 - Doctrine\DBAL\Schema\SchemaException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$table = $schema->getTable('deck_cards');
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:142:6 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setApp('deck')
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:143:6 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setObject('card', (string)$card->getId())
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:144:6 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setSubject('card-overdue', []);
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:158:6 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setApp('deck')
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:159:6 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setUser($userId)
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:160:6 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setDateTime(new DateTime())
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:161:6 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setObject('card', (string)$card->getId())
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:162:7 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setSubject('card-assigned', [
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:167:31 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->notificationManager->notify($notification);
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:173:6 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setApp('deck')
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:174:6 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setUser($userId)
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:175:6 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setObject('card', (string)$card->getId())
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:176:6 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setSubject('card-assigned', []);
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:195:20 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$notification->setDateTime(new DateTime());
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:196:33 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->notificationManager->notify($notification);
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:249:6 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setApp('deck')
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:250:6 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setUser($userId)
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:251:6 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setObject('board', (string)$board->getId())
ERROR: MissingThrowsDocblock - lib/Notification/NotificationHelper.php:252:6 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->setSubject('board-shared', [$board->getTitle(), $this->currentUser]);
ERROR: MissingThrowsDocblock - lib/Notification/Notifier.php:106:6 - OCP\Notification\AlreadyProcessedException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new AlreadyProcessedException();
ERROR: MissingThrowsDocblock - lib/Notification/Notifier.php:111:34 - OCP\AppFramework\Db\MultipleObjectsReturnedException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$stack = $this->stackMapper->find($stackId);
ERROR: MissingThrowsDocblock - lib/Notification/Notifier.php:152:6 - OCP\Notification\AlreadyProcessedException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new AlreadyProcessedException();
ERROR: MissingThrowsDocblock - lib/Notification/Notifier.php:157:34 - OCP\AppFramework\Db\MultipleObjectsReturnedException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$stack = $this->stackMapper->find($stackId);
ERROR: MissingThrowsDocblock - lib/Notification/Notifier.php:187:6 - OCP\Notification\AlreadyProcessedException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new AlreadyProcessedException();
ERROR: MissingThrowsDocblock - lib/Notification/Notifier.php:192:34 - OCP\AppFramework\Db\MultipleObjectsReturnedException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$stack = $this->stackMapper->find($stackId);
ERROR: MissingThrowsDocblock - lib/Notification/Notifier.php:229:6 - OCP\Notification\AlreadyProcessedException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new AlreadyProcessedException();
ERROR: MissingThrowsDocblock - lib/Service/AssignmentService.php:151:45 - OCA\Deck\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$assignment = $this->assignedUsersMapper->insert($assignment);
ERROR: MissingThrowsDocblock - lib/Service/AttachmentService.php:75:10 - OCP\AppFramework\QueryException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->registerAttachmentService('deck_file', FileService::class);
ERROR: MissingThrowsDocblock - lib/Service/AttachmentService.php:76:10 - OCP\AppFramework\QueryException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->registerAttachmentService('file', FilesAppService::class);
ERROR: MissingThrowsDocblock - lib/Service/AttachmentService.php:273:4 - OCA\Deck\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new NotFoundException();
ERROR: MissingThrowsDocblock - lib/Service/AttachmentService.php:287:5 - OCA\Deck\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new NotFoundException();
ERROR: MissingThrowsDocblock - lib/Service/AttachmentService.php:369:4 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new NoPermissionException('Permission denied');
ERROR: MissingThrowsDocblock - lib/Service/AttachmentService.php:386:3 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new NoPermissionException('Restore is not allowed.');
ERROR: MissingThrowsDocblock - lib/Service/BoardService.php:297:4 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new NoPermissionException('Creating boards has been disabled for your account.');
ERROR: MissingThrowsDocblock - lib/Service/BoardService.php:355:32 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$board = $this->boardMapper->update($board);
ERROR: MissingThrowsDocblock - lib/Service/BoardService.php:371:4 - OCA\Deck\BadRequestException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new BadRequestException('board id must be a number');
ERROR: MissingThrowsDocblock - lib/Service/BoardService.php:375:19 - OCA\Deck\BadRequestException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$board = $this->find($id);
ERROR: MissingThrowsDocblock - lib/Service/BoardService.php:377:32 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$board = $this->boardMapper->update($board);
ERROR: MissingThrowsDocblock - lib/Service/BoardService.php:439:23 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->boardMapper->update($board); // operate on clone so we can check for updated fields
ERROR: MissingThrowsDocblock - lib/Service/BoardService.php:441:27 - Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->activityManager->triggerUpdateEvents(ActivityManager::DECK_OBJECT_BOARD, $changes, ActivityManager::SUBJECT_BOARD_UPDATE);
ERROR: MissingThrowsDocblock - lib/Service/BoardService.php:570:30 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$board = $this->aclMapper->update($acl);
ERROR: MissingThrowsDocblock - lib/Service/CardService.php:105:55 - OCA\Deck\BadRequestException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$card->setAttachmentCount($this->attachmentService->count($cardId));
ERROR: MissingThrowsDocblock - lib/Service/CardService.php:113:32 - OCP\AppFramework\Db\MultipleObjectsReturnedException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$stack = $this->stackMapper->find($card->getStackId());
ERROR: MissingThrowsDocblock - lib/Service/CardService.php:114:33 - OCA\Deck\BadRequestException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$board = $this->boardService->find($stack->getBoardId());
ERROR: MissingThrowsDocblock - lib/Service/CardService.php:120:29 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->permissionService->checkPermission($this->boardMapper, $boardId, Acl::PERMISSION_READ);
ERROR: MissingThrowsDocblock - lib/Service/CardService.php:157:29 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->permissionService->checkPermission($this->boardMapper, $boardId, Acl::PERMISSION_READ);
ERROR: MissingThrowsDocblock - lib/Service/CardService.php:245:22 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->cardMapper->update($card);
ERROR: MissingThrowsDocblock - lib/Service/CardService.php:347:27 - Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->activityManager->triggerUpdateEvents(ActivityManager::DECK_OBJECT_CARD, $changes, ActivityManager::SUBJECT_CARD_UPDATE);
ERROR: MissingThrowsDocblock - lib/Service/CardService.php:355:30 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$card = $this->cardMapper->update($card);
ERROR: MissingThrowsDocblock - lib/Service/CardService.php:399:32 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$update = $this->cardMapper->update($card);
ERROR: MissingThrowsDocblock - lib/Service/CardService.php:443:22 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->cardMapper->update($card);
ERROR: MissingThrowsDocblock - lib/Service/CardService.php:445:27 - Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->activityManager->triggerUpdateEvents(ActivityManager::DECK_OBJECT_CARD, $changes, ActivityManager::SUBJECT_CARD_UPDATE);
ERROR: MissingThrowsDocblock - lib/Service/CardService.php:488:28 - OCP\AppFramework\Db\MultipleObjectsReturnedException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
if ($this->boardService->isArchived($this->cardMapper, $id)) {
ERROR: MissingThrowsDocblock - lib/Service/CardService.php:493:33 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$newCard = $this->cardMapper->update($card);
ERROR: MissingThrowsDocblock - lib/Service/CardService.php:523:33 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$newCard = $this->cardMapper->update($card);
ERROR: MissingThrowsDocblock - lib/Service/CommentService.php:67:4 - OCA\Deck\BadRequestException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new BadRequestException('A valid card id must be provided');
ERROR: MissingThrowsDocblock - lib/Service/CommentService.php:130:4 - OCA\Deck\BadRequestException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new BadRequestException('A valid card id must be provided');
ERROR: MissingThrowsDocblock - lib/Service/CommentService.php:133:4 - OCA\Deck\BadRequestException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new BadRequestException('A valid comment id must be provided');
ERROR: MissingThrowsDocblock - lib/Service/CommentService.php:142:4 - OCA\Deck\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new NotFoundException('No comment found.');
ERROR: MissingThrowsDocblock - lib/Service/CommentService.php:145:4 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new NoPermissionException('Only authors are allowed to edit their comment.');
ERROR: MissingThrowsDocblock - lib/Service/CommentService.php:151:13 - OCP\Comments\MessageTooLongException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$comment->setMessage($message);
ERROR: MissingThrowsDocblock - lib/Service/CommentService.php:152:27 - OCP\Comments\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->commentsManager->save($comment);
ERROR: MissingThrowsDocblock - lib/Service/CommentService.php:158:4 - OCA\Deck\BadRequestException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new BadRequestException('A valid card id must be provided');
ERROR: MissingThrowsDocblock - lib/Service/CommentService.php:161:4 - OCA\Deck\BadRequestException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new BadRequestException('A valid comment id must be provided');
ERROR: MissingThrowsDocblock - lib/Service/CommentService.php:171:4 - OCA\Deck\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new NotFoundException('No comment found.');
ERROR: MissingThrowsDocblock - lib/Service/CommentService.php:174:4 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new NoPermissionException('Only authors are allowed to edit their comment.');
ERROR: MissingThrowsDocblock - lib/Service/ConfigService.php:109:4 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new NoPermissionException('Must be logged in to set user config');
ERROR: MissingThrowsDocblock - lib/Service/ConfigService.php:117:6 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new NoPermissionException('You must be admin to set the group limit');
ERROR: MissingThrowsDocblock - lib/Service/ConfigService.php:122:20 - OCP\PreConditionNotMetException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->config->setUserValue($this->getUserId(), Application::APP_ID, 'calendar', (string)$value);
ERROR: MissingThrowsDocblock - lib/Service/ConfigService.php:128:6 - OCA\Deck\BadRequestException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new BadRequestException('Board notification option must be one of: off, assigned, all');
ERROR: MissingThrowsDocblock - lib/Service/ConfigService.php:130:20 - OCP\PreConditionNotMetException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->config->setUserValue($this->getUserId(), Application::APP_ID, $key, (string)$value);
ERROR: MissingThrowsDocblock - lib/Service/ConfigService.php:173:4 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new NoPermissionException('Must be logged in get the attachment folder');
ERROR: MissingThrowsDocblock - lib/Service/DefaultBoardService.php:69:20 - UnexpectedValueException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->config->setUserValue($userId, Application::APP_ID, 'firstRun', 'no');
ERROR: MissingThrowsDocblock - lib/Service/FileService.php:92:30 - RuntimeException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$folder = $this->appData->getFolder($folderName);
ERROR: MissingThrowsDocblock - lib/Service/FileService.php:94:30 - RuntimeException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$folder = $this->appData->newFolder($folderName);
ERROR: MissingThrowsDocblock - lib/Service/FileService.php:167:12 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$target->putContent($content);
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:140:34 - OCP\Share\Exceptions\ShareNotFound is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$share = $this->shareProvider->getShareById($attachment->getId());
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:141:41 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$files = $userFolder->getById($share->getNode()->getId());
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:141:52 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$files = $userFolder->getById($share->getNode()->getId());
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:165:4 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new NotFoundException('File not found');
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:167:19 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$file = $share->getNode();
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:169:4 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new NotFoundException('File not found');
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:172:41 - OCP\Files\NotPermittedException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$response = new StreamResponse($file->fopen('rb'));
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:179:18 - OCA\Deck\StatusException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$file = $this->getUploadedFile();
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:196:4 - OCA\Deck\StatusException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new StatusException('Could not read file');
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:206:33 - Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$share = $this->shareManager->createShare($share);
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:243:34 - OCP\Share\Exceptions\ShareNotFound is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$share = $this->shareProvider->getShareById($attachment->getId());
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:244:21 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$target = $share->getNode();
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:245:18 - OCA\Deck\StatusException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$file = $this->getUploadedFile();
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:251:4 - OCA\Deck\StatusException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new StatusException('Could not read file');
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:253:12 - OCP\Files\NotPermittedException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$target->putContent($content);
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:261:34 - OCP\Share\Exceptions\ShareNotFound is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$share = $this->shareProvider->getShareById($attachment->getId());
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:262:19 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$file = $share->getNode();
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:267:40 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$canEdit = $this->permissionService->checkPermission($this->cardMapper, $attachment->getCardId(), Acl::PERMISSION_EDIT);
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:270:25 - OCP\Share\Exceptions\ShareNotFound is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->shareManager->deleteShare($share);
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:274:3 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new NoPermissionException('No permission to remove the attachment from the card');
ERROR: MissingThrowsDocblock - lib/Service/FilesAppService.php:282:3 - Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new \Exception('Not implemented');
ERROR: MissingThrowsDocblock - lib/Service/LabelService.php:185:30 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
return $this->labelMapper->update($label);
ERROR: MissingThrowsDocblock - lib/Service/OverviewService.php:85:55 - OCA\Deck\BadRequestException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$card->setAttachmentCount($this->attachmentService->count($cardId));
ERROR: MissingThrowsDocblock - lib/Service/StackService.php:112:29 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->permissionService->checkPermission($this->stackMapper, $stackId, Acl::PERMISSION_READ);
ERROR: MissingThrowsDocblock - lib/Service/StackService.php:145:29 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->permissionService->checkPermission(null, $boardId, Acl::PERMISSION_READ);
ERROR: MissingThrowsDocblock - lib/Service/StackService.php:150:29 - OCA\Deck\NoPermissionException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->permissionService->checkPermission($this->boardMapper, $boardId, Acl::PERMISSION_READ);
ERROR: MissingThrowsDocblock - lib/Service/StackService.php:245:32 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$stack = $this->stackMapper->update($stack);
ERROR: MissingThrowsDocblock - lib/Service/StackService.php:298:32 - InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$stack = $this->stackMapper->update($stack);
ERROR: MissingThrowsDocblock - lib/Service/StackService.php:299:27 - Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$this->activityManager->triggerUpdateEvents(
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:127:52 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$existingShares = $this->getSharesByPath($share->getNode());
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:146:12 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$share->getNodeType(),
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:147:12 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$share->getNodeId(),
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:153:18 - OCP\Share\Exceptions\ShareNotFound is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$data = $this->getRawShare($shareId);
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:201:8 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$qb->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:203:15 - BadMethodCallException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
return $qb->getLastInsertId();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:219:18 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$cursor = $qb->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:238:11 - OCP\Share\Exceptions\IllegalIDChangeException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$share->setId($data['id'])
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:263:11 - OCP\Share\Exceptions\IllegalIDChangeException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$share->setProviderId($this->identifier());
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:300:59 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->set('item_source', $qb->createNamedParameter($share->getNode()->getId()))
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:300:70 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->set('item_source', $qb->createNamedParameter($share->getNode()->getId()))
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:301:59 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->set('file_source', $qb->createNamedParameter($share->getNode()->getId()))
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:301:70 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->set('file_source', $qb->createNamedParameter($share->getNode()->getId()))
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:303:6 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:313:59 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->set('item_source', $qb->createNamedParameter($share->getNode()->getId()))
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:313:70 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->set('item_source', $qb->createNamedParameter($share->getNode()->getId()))
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:314:59 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->set('file_source', $qb->createNamedParameter($share->getNode()->getId()))
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:314:70 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->set('file_source', $qb->createNamedParameter($share->getNode()->getId()))
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:316:6 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:326:6 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:341:8 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$qb->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:359:6 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:374:55 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
'item_type' => $qb->createNamedParameter($share->getNodeType()),
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:375:57 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
'item_source' => $qb->createNamedParameter($share->getNodeId()),
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:376:57 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
'file_source' => $qb->createNamedParameter($share->getNodeId()),
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:380:9 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
])->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:387:7 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:401:18 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$cursor = $qb->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:418:8 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$qb->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:439:6 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:454:55 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
'item_type' => $qb->createNamedParameter($share->getNodeType()),
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:455:57 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
'item_source' => $qb->createNamedParameter($share->getNodeId()),
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:456:57 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
'file_source' => $qb->createNamedParameter($share->getNodeId()),
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:460:9 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
])->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:467:7 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:504:78 - OCP\Files\InvalidPathException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId())));
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:508:18 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$cursor = $qb->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:543:82 - OCP\Files\InvalidPathException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$qb->andWhere($qb->expr()->eq('file_source', $qb->createNamedParameter($node->getId())));
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:553:18 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$cursor = $qb->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:581:18 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$cursor = $qb->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:674:79 - OCP\Files\InvalidPathException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->andWhere($qb->expr()->eq('file_source', $qb->createNamedParameter($path->getId())))
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:676:6 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:807:18 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$cursor = $qb->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:927:18 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$cursor = $qb->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:1018:18 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$cursor = $qb->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/DeckShareProvider.php:1041:18 - OCP\DB\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$cursor = $qb->execute();
ERROR: MissingThrowsDocblock - lib/Sharing/Listener.php:74:72 - OCP\Files\NotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
$target = DeckShareProvider::DECK_FOLDER_PLACEHOLDER . '/' . $share->getNode()->getName();
ERROR: MissingThrowsDocblock - lib/Sharing/ShareAPIHelper.php:73:5 - OCP\AppFramework\OCS\OCSNotFoundException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
throw new OCSNotFoundException($this->l10n->t('Invalid date, date format must be YYYY-MM-DD'));
------------------------------
234 errors found
------------------------------
I could not yet find a way to automatically get all uncatched ones that may be called by controller methods.