@@ -134,7 +134,7 @@ |
||
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | /** |
| 137 | - * @param $cardId |
|
| 137 | + * @param string $cardId |
|
| 138 | 138 | * @return Board |
| 139 | 139 | * @throws DoesNotExistException |
| 140 | 140 | * @throws MultipleObjectsReturnedException |
@@ -151,7 +151,7 @@ |
||
| 151 | 151 | } catch (QueryException $e) { |
| 152 | 152 | } |
| 153 | 153 | if ($cardId !== null) { |
| 154 | - $resource = $resourceManager->getResourceForUser(self::RESOURCE_TYPE, (string)$cardId, null); |
|
| 154 | + $resource = $resourceManager->getResourceForUser(self::RESOURCE_TYPE, (string) $cardId, null); |
|
| 155 | 155 | $resourceManager->invalidateAccessCacheForResource($resource); |
| 156 | 156 | } else { |
| 157 | 157 | $resourceManager->invalidateAccessCacheForProvider($this); |
@@ -326,8 +326,8 @@ |
||
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | /** |
| 329 | - * @param $id |
|
| 330 | - * @param $order |
|
| 329 | + * @param integer $id |
|
| 330 | + * @param integer $order |
|
| 331 | 331 | * |
| 332 | 332 | * @return array |
| 333 | 333 | * @throws \OCA\Deck\NoPermissionException |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | * @return array |
| 56 | 56 | */ |
| 57 | 57 | public function reorder($cardId, $stackId, $order) { |
| 58 | - return $this->cardService->reorder((int)$cardId, (int)$stackId, (int)$order); |
|
| 58 | + return $this->cardService->reorder((int) $cardId, (int) $stackId, (int) $order); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | * @return array |
| 89 | 89 | */ |
| 90 | 90 | public function reorder($stackId, $order) { |
| 91 | - return $this->stackService->reorder((int)$stackId, (int)$order); |
|
| 91 | + return $this->stackService->reorder((int) $stackId, (int) $order); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | /** |
| 174 | 174 | */ |
| 175 | 175 | protected function registerCommentsEventHandler(): void { |
| 176 | - $this->server->getCommentsManager()->registerEventHandler(function () { |
|
| 176 | + $this->server->getCommentsManager()->registerEventHandler(function() { |
|
| 177 | 177 | return $this->getContainer()->query(CommentEventHandler::class); |
| 178 | 178 | }); |
| 179 | 179 | } |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | $resourceManager->registerResourceProvider(ResourceProvider::class); |
| 200 | 200 | $resourceManager->registerResourceProvider(ResourceProviderCard::class); |
| 201 | 201 | |
| 202 | - $this->server->getEventDispatcher()->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', static function () { |
|
| 202 | + $this->server->getEventDispatcher()->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', static function() { |
|
| 203 | 203 | Util::addScript('deck', 'collections'); |
| 204 | 204 | }); |
| 205 | 205 | } |
@@ -24,7 +24,6 @@ |
||
| 24 | 24 | namespace OCA\Deck\AppInfo; |
| 25 | 25 | |
| 26 | 26 | use Exception; |
| 27 | -use InvalidArgumentException; |
|
| 28 | 27 | use OC_Util; |
| 29 | 28 | use OCA\Deck\Activity\CommentEventHandler; |
| 30 | 29 | use OCA\Deck\Capabilities; |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | private $config; |
| 40 | 40 | private $l10n; |
| 41 | 41 | |
| 42 | - public function __construct( |
|
| 42 | + public function __construct( |
|
| 43 | 43 | IL10N $l10n, |
| 44 | 44 | BoardMapper $boardMapper, |
| 45 | 45 | BoardService $boardService, |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $this->config = $config; |
| 55 | 55 | $this->boardMapper = $boardMapper; |
| 56 | 56 | $this->l10n = $l10n; |
| 57 | - } |
|
| 57 | + } |
|
| 58 | 58 | |
| 59 | 59 | /** |
| 60 | 60 | * Return true if this is the first time a user is acessing their instance with deck enabled |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | return false; |
| 79 | - } |
|
| 79 | + } |
|
| 80 | 80 | |
| 81 | 81 | /** |
| 82 | 82 | * @param $title |
@@ -103,9 +103,9 @@ discard block |
||
| 103 | 103 | throw new BadRequestException('color must be provided'); |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - $defaultBoard = $this->boardService->create($title, $userId, $color); |
|
| 107 | - $defaultStacks = []; |
|
| 108 | - $defaultCards = []; |
|
| 106 | + $defaultBoard = $this->boardService->create($title, $userId, $color); |
|
| 107 | + $defaultStacks = []; |
|
| 108 | + $defaultCards = []; |
|
| 109 | 109 | |
| 110 | 110 | $boardId = $defaultBoard->getId(); |
| 111 | 111 | |
@@ -118,5 +118,5 @@ discard block |
||
| 118 | 118 | $defaultCards[] = $this->cardService->create($this->l10n->t('Example Task 1'), $defaultStacks[2]->getId(), 'text', 0, $userId); |
| 119 | 119 | |
| 120 | 120 | return $defaultBoard; |
| 121 | - } |
|
| 121 | + } |
|
| 122 | 122 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | use OCA\Deck\AppInfo\Application; |
| 25 | 25 | use OCP\AppFramework\QueryException; |
| 26 | 26 | |
| 27 | -if ((@include_once __DIR__ . '/../vendor/autoload.php')=== false) { |
|
| 27 | +if ((@include_once __DIR__ . '/../vendor/autoload.php') === false) { |
|
| 28 | 28 | throw new Exception('Cannot include autoload. Did you run install dependencies using composer?'); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -94,6 +94,7 @@ |
||
| 94 | 94 | |
| 95 | 95 | /** |
| 96 | 96 | * @inheritDoc |
| 97 | + * @return string |
|
| 97 | 98 | */ |
| 98 | 99 | function get() { |
| 99 | 100 | if ($this->card) { |
@@ -23,8 +23,6 @@ |
||
| 23 | 23 | namespace OCA\Deck\DAV; |
| 24 | 24 | |
| 25 | 25 | use OCA\Deck\Db\Card; |
| 26 | -use OCA\Deck\Service\CardService; |
|
| 27 | -use Sabre\VObject\Component\VCalendar; |
|
| 28 | 26 | |
| 29 | 27 | class CalendarObject implements \Sabre\CalDAV\ICalendarObject, \Sabre\DAVACL\IACL { |
| 30 | 28 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | /** |
| 71 | - * @param $card |
|
| 71 | + * @param \OCP\AppFramework\Db\Entity $card |
|
| 72 | 72 | * @throws \OCP\AppFramework\Db\DoesNotExistException |
| 73 | 73 | */ |
| 74 | 74 | public function sendCardDuedate($card) { |
@@ -99,6 +99,9 @@ discard block |
||
| 99 | 99 | $this->cardMapper->markNotified($card); |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | + /** |
|
| 103 | + * @param \OCA\Deck\Db\Card $card |
|
| 104 | + */ |
|
| 102 | 105 | public function markDuedateAsRead($card) { |
| 103 | 106 | $notification = $this->notificationManager->createNotification(); |
| 104 | 107 | $notification |
@@ -108,6 +111,9 @@ discard block |
||
| 108 | 111 | $this->notificationManager->markProcessed($notification); |
| 109 | 112 | } |
| 110 | 113 | |
| 114 | + /** |
|
| 115 | + * @param \OCA\Deck\Db\Card $card |
|
| 116 | + */ |
|
| 111 | 117 | public function sendCardAssigned($card, $userId) { |
| 112 | 118 | $boardId = $this->cardMapper->findBoardId($card->getId()); |
| 113 | 119 | $board = $this->getBoard($boardId); |