@@ -89,7 +89,7 @@ |
||
| 89 | 89 | /** |
| 90 | 90 | * Get current user permissions for a board |
| 91 | 91 | * |
| 92 | - * @param Board|Entity $board |
|
| 92 | + * @param Board $board |
|
| 93 | 93 | * @return array|bool |
| 94 | 94 | * @internal param $boardId |
| 95 | 95 | */ |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | /** |
| 94 | 94 | * @param $id |
| 95 | - * @return RelationalEntity if not found |
|
| 95 | + * @return Entity if not found |
|
| 96 | 96 | * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException |
| 97 | 97 | * @throws \OCP\AppFramework\Db\DoesNotExistException |
| 98 | 98 | */ |
@@ -136,6 +136,9 @@ discard block |
||
| 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) { |
@@ -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 |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $qb = $this->db->getQueryBuilder(); |
| 54 | 54 | $qb->select('*') |
| 55 | 55 | ->from('deck_attachment') |
| 56 | - ->where($qb->expr()->eq('id', (string)$id)); |
|
| 56 | + ->where($qb->expr()->eq('id', (string) $id)); |
|
| 57 | 57 | |
| 58 | 58 | $cursor = $qb->execute(); |
| 59 | 59 | $row = $cursor->fetch(PDO::FETCH_ASSOC); |
@@ -71,13 +71,13 @@ discard block |
||
| 71 | 71 | $qb = $this->db->getQueryBuilder(); |
| 72 | 72 | $qb->select('*') |
| 73 | 73 | ->from('deck_attachment') |
| 74 | - ->where($qb->expr()->eq('card_id', (string)$cardId, IQueryBuilder::PARAM_INT)) |
|
| 75 | - ->andWhere($qb->expr()->eq('deleted_at', (string)0, IQueryBuilder::PARAM_INT)); |
|
| 74 | + ->where($qb->expr()->eq('card_id', (string) $cardId, IQueryBuilder::PARAM_INT)) |
|
| 75 | + ->andWhere($qb->expr()->eq('deleted_at', (string) 0, IQueryBuilder::PARAM_INT)); |
|
| 76 | 76 | |
| 77 | 77 | |
| 78 | 78 | $entities = []; |
| 79 | 79 | $cursor = $qb->execute(); |
| 80 | - while($row = $cursor->fetch()){ |
|
| 80 | + while ($row = $cursor->fetch()) { |
|
| 81 | 81 | $entities[] = $this->mapRowToEntity($row); |
| 82 | 82 | } |
| 83 | 83 | $cursor->closeCursor(); |
@@ -93,16 +93,16 @@ discard block |
||
| 93 | 93 | ->where($qb->expr()->gt('deleted_at', '0', IQueryBuilder::PARAM_INT)); |
| 94 | 94 | if ($withOffset) { |
| 95 | 95 | $qb |
| 96 | - ->andWhere($qb->expr()->lt('deleted_at', (string)$timeLimit, IQueryBuilder::PARAM_INT)); |
|
| 96 | + ->andWhere($qb->expr()->lt('deleted_at', (string) $timeLimit, IQueryBuilder::PARAM_INT)); |
|
| 97 | 97 | } |
| 98 | 98 | if ($cardId !== null) { |
| 99 | 99 | $qb |
| 100 | - ->andWhere($qb->expr()->eq('card_id', (string)$cardId, IQueryBuilder::PARAM_INT)); |
|
| 100 | + ->andWhere($qb->expr()->eq('card_id', (string) $cardId, IQueryBuilder::PARAM_INT)); |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | $entities = []; |
| 104 | 104 | $cursor = $qb->execute(); |
| 105 | - while($row = $cursor->fetch()){ |
|
| 105 | + while ($row = $cursor->fetch()) { |
|
| 106 | 106 | $entities[] = $this->mapRowToEntity($row); |
| 107 | 107 | } |
| 108 | 108 | $cursor->closeCursor(); |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * @throws NotPermittedException |
| 69 | 69 | */ |
| 70 | 70 | private function getFolder(Attachment $attachment) { |
| 71 | - $folderName = 'file-card-' . (int)$attachment->getCardId(); |
|
| 71 | + $folderName = 'file-card-' . (int) $attachment->getCardId(); |
|
| 72 | 72 | try { |
| 73 | 73 | $folder = $this->appData->getFolder($folderName); |
| 74 | 74 | } catch (NotFoundException $e) { |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | return $attachment; |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - private function getUploadedFile () { |
|
| 97 | + private function getUploadedFile() { |
|
| 98 | 98 | $file = $this->request->getUploadedFile('file'); |
| 99 | 99 | $error = null; |
| 100 | 100 | $phpFileUploadErrors = [ |