@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | try { |
| 100 | 100 | $this->fullTextSearchManager->createIndex( |
| 101 | - DeckProvider::DECK_PROVIDER_ID, (string)$cardId, $userId, IIndex::INDEX_FULL |
|
| 101 | + DeckProvider::DECK_PROVIDER_ID, (string) $cardId, $userId, IIndex::INDEX_FULL |
|
| 102 | 102 | ); |
| 103 | 103 | } catch (FullTextSearchAppNotAvailableException $e) { |
| 104 | 104 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | try { |
| 115 | 115 | $this->fullTextSearchManager->updateIndexStatus( |
| 116 | - DeckProvider::DECK_PROVIDER_ID, (string)$cardId, IIndex::INDEX_CONTENT |
|
| 116 | + DeckProvider::DECK_PROVIDER_ID, (string) $cardId, IIndex::INDEX_CONTENT |
|
| 117 | 117 | ); |
| 118 | 118 | } catch (FullTextSearchAppNotAvailableException $e) { |
| 119 | 119 | } |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | |
| 129 | 129 | try { |
| 130 | 130 | $this->fullTextSearchManager->updateIndexStatus( |
| 131 | - DeckProvider::DECK_PROVIDER_ID, (string)$cardId, IIndex::INDEX_REMOVE |
|
| 131 | + DeckProvider::DECK_PROVIDER_ID, (string) $cardId, IIndex::INDEX_REMOVE |
|
| 132 | 132 | ); |
| 133 | 133 | } catch (FullTextSearchAppNotAvailableException $e) { |
| 134 | 134 | } |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | * @param GenericEvent $e |
| 140 | 140 | */ |
| 141 | 141 | public function onBoardShares(GenericEvent $e) { |
| 142 | - $boardId = (int)$e->getArgument('boardId'); |
|
| 142 | + $boardId = (int) $e->getArgument('boardId'); |
|
| 143 | 143 | |
| 144 | 144 | $cards = array_map( |
| 145 | 145 | function(Card $item) { |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | * @return IIndexDocument |
| 163 | 163 | */ |
| 164 | 164 | public function generateIndexDocumentFromCard(Card $card): IIndexDocument { |
| 165 | - $document = new IndexDocument(DeckProvider::DECK_PROVIDER_ID, (string)$card->getId()); |
|
| 165 | + $document = new IndexDocument(DeckProvider::DECK_PROVIDER_ID, (string) $card->getId()); |
|
| 166 | 166 | |
| 167 | 167 | return $document; |
| 168 | 168 | } |
@@ -176,11 +176,11 @@ discard block |
||
| 176 | 176 | */ |
| 177 | 177 | public function fillIndexDocument(IIndexDocument $document) { |
| 178 | 178 | /** @var Card $card */ |
| 179 | - $card = $this->cardMapper->find((int)$document->getId()); |
|
| 179 | + $card = $this->cardMapper->find((int) $document->getId()); |
|
| 180 | 180 | |
| 181 | 181 | $document->setTitle(($card->getTitle() === null) ? '' : $card->getTitle()); |
| 182 | 182 | $document->setContent(($card->getDescription() === null) ? '' : $card->getDescription()); |
| 183 | - $document->setAccess($this->generateDocumentAccessFromCardId((int)$card->getId())); |
|
| 183 | + $document->setAccess($this->generateDocumentAccessFromCardId((int) $card->getId())); |
|
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | * @throws MultipleObjectsReturnedException |
| 242 | 242 | */ |
| 243 | 243 | public function getBoardFromCardId(int $cardId): Board { |
| 244 | - $boardId = (int)$this->cardMapper->findBoardId($cardId); |
|
| 244 | + $boardId = (int) $this->cardMapper->findBoardId($cardId); |
|
| 245 | 245 | /** @var Board $board */ |
| 246 | 246 | $board = $this->boardMapper->find($boardId); |
| 247 | 247 | |
@@ -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 | } |
@@ -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 | |