@@ -63,7 +63,7 @@ |
||
| 63 | 63 | * Check if user exists before assigning it to a card |
| 64 | 64 | * |
| 65 | 65 | * @param Entity $entity |
| 66 | - * @return null|Entity |
|
| 66 | + * @return AssignedUsers|null |
|
| 67 | 67 | */ |
| 68 | 68 | public function insert(Entity $entity) { |
| 69 | 69 | $user = $this->userManager->get($entity->getParticipant()); |
@@ -163,7 +163,7 @@ |
||
| 163 | 163 | * @param $cardId |
| 164 | 164 | * @param $attachmentId |
| 165 | 165 | * @param $request |
| 166 | - * @return mixed |
|
| 166 | + * @return \OCP\AppFramework\Db\Entity |
|
| 167 | 167 | * @throws \OCA\Deck\NoPermissionException |
| 168 | 168 | * @throws \OCP\AppFramework\Db\DoesNotExistException |
| 169 | 169 | * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException |
@@ -32,10 +32,10 @@ |
||
| 32 | 32 | use OCA\Deck\Controller\Helper\ApiHelper; |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | - * Class BoardApiController |
|
| 36 | - * |
|
| 37 | - * @package OCA\Deck\Controller |
|
| 38 | - */ |
|
| 35 | + * Class BoardApiController |
|
| 36 | + * |
|
| 37 | + * @package OCA\Deck\Controller |
|
| 38 | + */ |
|
| 39 | 39 | class LabelApiController extends ApiController { |
| 40 | 40 | |
| 41 | 41 | private $labelService; |
@@ -141,7 +141,7 @@ |
||
| 141 | 141 | |
| 142 | 142 | /** |
| 143 | 143 | * @param $boardId |
| 144 | - * @return bool |
|
| 144 | + * @return boolean|null |
|
| 145 | 145 | */ |
| 146 | 146 | public function userIsBoardOwner($boardId) { |
| 147 | 147 | try { |
@@ -136,6 +136,9 @@ |
||
| 136 | 136 | return parent::delete($entity); |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | + /** |
|
| 140 | + * @param integer $stackId |
|
| 141 | + */ |
|
| 139 | 142 | public function deleteByStack($stackId) { |
| 140 | 143 | $cards = $this->findAllByStack($stackId); |
| 141 | 144 | foreach ($cards as $card) { |
@@ -94,6 +94,9 @@ |
||
| 94 | 94 | $this->cardMapper->markNotified($card); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | + /** |
|
| 98 | + * @param \OCA\Deck\Db\Card $card |
|
| 99 | + */ |
|
| 97 | 100 | public function sendCardAssigned($card, $userId) { |
| 98 | 101 | $boardId = $this->cardMapper->findBoardId($card->getId()); |
| 99 | 102 | $board = $this->getBoard($boardId); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | private $config; |
| 41 | 41 | private $l10n; |
| 42 | 42 | |
| 43 | - public function __construct( |
|
| 43 | + public function __construct( |
|
| 44 | 44 | IL10N $l10n, |
| 45 | 45 | BoardMapper $boardMapper, |
| 46 | 46 | BoardService $boardService, |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $this->config = $config; |
| 56 | 56 | $this->boardMapper = $boardMapper; |
| 57 | 57 | $this->l10n = $l10n; |
| 58 | - } |
|
| 58 | + } |
|
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | 61 | * @param $userId |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | return false; |
| 76 | - } |
|
| 76 | + } |
|
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | 79 | * @param $title |
@@ -100,9 +100,9 @@ discard block |
||
| 100 | 100 | throw new BadRequestException('color must be provided'); |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - $defaultBoard = $this->boardService->create($title, $userId, $color); |
|
| 104 | - $defaultStacks = []; |
|
| 105 | - $defaultCards = []; |
|
| 103 | + $defaultBoard = $this->boardService->create($title, $userId, $color); |
|
| 104 | + $defaultStacks = []; |
|
| 105 | + $defaultCards = []; |
|
| 106 | 106 | |
| 107 | 107 | $boardId = $defaultBoard->getId(); |
| 108 | 108 | |
@@ -115,5 +115,5 @@ discard block |
||
| 115 | 115 | $defaultCards[] = $this->cardService->create($this->l10n->t('Example Task 1'), $defaultStacks[2]->getId(), 'text', 0, $userId); |
| 116 | 116 | |
| 117 | 117 | return $defaultBoard; |
| 118 | - } |
|
| 118 | + } |
|
| 119 | 119 | } |
| 120 | 120 | \ No newline at end of file |
@@ -173,6 +173,9 @@ |
||
| 173 | 173 | return ($board->getOwner() === $userId); |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | + /** |
|
| 177 | + * @param string $id |
|
| 178 | + */ |
|
| 176 | 179 | public function findBoardId($id) { |
| 177 | 180 | return $id; |
| 178 | 181 | } |
@@ -166,6 +166,9 @@ discard block |
||
| 166 | 166 | return $event; |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | + /** |
|
| 170 | + * @param string $paramName |
|
| 171 | + */ |
|
| 169 | 172 | private function parseParamForBoard($paramName, $subjectParams, $params) { |
| 170 | 173 | if (array_key_exists($paramName, $subjectParams)) { |
| 171 | 174 | $params[$paramName] = [ |
@@ -177,6 +180,10 @@ discard block |
||
| 177 | 180 | } |
| 178 | 181 | return $params; |
| 179 | 182 | } |
| 183 | + |
|
| 184 | + /** |
|
| 185 | + * @param string $paramName |
|
| 186 | + */ |
|
| 180 | 187 | private function parseParamForStack($paramName, $subjectParams, $params) { |
| 181 | 188 | if (array_key_exists($paramName, $subjectParams)) { |
| 182 | 189 | $params[$paramName] = [ |
@@ -188,6 +195,9 @@ discard block |
||
| 188 | 195 | return $params; |
| 189 | 196 | } |
| 190 | 197 | |
| 198 | + /** |
|
| 199 | + * @param string $paramName |
|
| 200 | + */ |
|
| 191 | 201 | private function parseParamForAttachment($paramName, $subjectParams, $params) { |
| 192 | 202 | if (array_key_exists($paramName, $subjectParams)) { |
| 193 | 203 | $params[$paramName] = [ |
@@ -226,6 +236,7 @@ discard block |
||
| 226 | 236 | * |
| 227 | 237 | * @param $subjectParams |
| 228 | 238 | * @param $params |
| 239 | + * @param IEvent $event |
|
| 229 | 240 | * @return mixed |
| 230 | 241 | */ |
| 231 | 242 | private function parseParamForChanges($subjectParams, $params, $event) { |
@@ -252,6 +263,9 @@ discard block |
||
| 252 | 263 | return $params; |
| 253 | 264 | } |
| 254 | 265 | |
| 266 | + /** |
|
| 267 | + * @param string $endpoint |
|
| 268 | + */ |
|
| 255 | 269 | public function deckUrl($endpoint) { |
| 256 | 270 | return $this->urlGenerator->linkToRoute('deck.page.index') . '#!' . $endpoint; |
| 257 | 271 | } |