@@ -241,7 +241,7 @@ |
||
241 | 241 | if (array_key_exists('comment', $subjectParams)) { |
242 | 242 | /** @var IComment $comment */ |
243 | 243 | try { |
244 | - $comment = $this->commentsManager->get((int)$subjectParams['comment']); |
|
244 | + $comment = $this->commentsManager->get((int) $subjectParams['comment']); |
|
245 | 245 | $event->setParsedMessage($comment->getMessage()); |
246 | 246 | } catch (NotFoundException $e) { |
247 | 247 | } |
@@ -91,8 +91,8 @@ |
||
91 | 91 | $card->setLabels($this->labelMapper->findAssignedLabelsForCard($cardId)); |
92 | 92 | $card->setAttachmentCount($this->attachmentService->count($cardId)); |
93 | 93 | $user = $this->userManager->get($this->currentUser); |
94 | - $lastRead = $this->commentsManager->getReadMark('deckCard', (string)$card->getId(), $user); |
|
95 | - $count = $this->commentsManager->getNumberOfCommentsForObject('deckCard', (string)$card->getId(), $lastRead); |
|
94 | + $lastRead = $this->commentsManager->getReadMark('deckCard', (string) $card->getId(), $user); |
|
95 | + $count = $this->commentsManager->getNumberOfCommentsForObject('deckCard', (string) $card->getId(), $lastRead); |
|
96 | 96 | $card->setCommentsUnread($count); |
97 | 97 | } |
98 | 98 |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | private function enrichStackWithCards($stack, $since = -1) { |
78 | 78 | $cards = $this->cardMapper->findAll($stack->getId(), null, null, $since); |
79 | 79 | |
80 | - if(\count($cards) === 0) { |
|
80 | + if (\count($cards) === 0) { |
|
81 | 81 | return; |
82 | 82 | } |
83 | 83 | |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | */ |
217 | 217 | public function delete($id) { |
218 | 218 | |
219 | - if ( is_numeric($id) === false ) { |
|
219 | + if (is_numeric($id) === false) { |
|
220 | 220 | throw new BadRequestException('stack id must be a number'); |
221 | 221 | } |
222 | 222 |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | public function cardChanged($cardId, $updateCard = true) { |
60 | 60 | $time = time(); |
61 | 61 | $etag = md5($time . microtime()); |
62 | - $this->cache->set(self::TYPE_CARD . '-' .$cardId, $etag); |
|
62 | + $this->cache->set(self::TYPE_CARD . '-' . $cardId, $etag); |
|
63 | 63 | if ($updateCard) { |
64 | 64 | $sql = 'UPDATE `*PREFIX*deck_cards` SET `last_modified` = ? WHERE `id` = ?'; |
65 | 65 | $this->db->executeUpdate($sql, [time(), $cardId]); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | public function stackChanged($stackId, $updateBoard = true) { |
77 | 77 | $time = time(); |
78 | 78 | $etag = md5($time . microtime()); |
79 | - $this->cache->set(self::TYPE_CARD . '-' .$stackId, $etag); |
|
79 | + $this->cache->set(self::TYPE_CARD . '-' . $stackId, $etag); |
|
80 | 80 | if ($updateBoard) { |
81 | 81 | $sql = 'UPDATE `*PREFIX*deck_stacks` SET `last_modified` = ? WHERE `id` = ?'; |
82 | 82 | $this->db->executeUpdate($sql, [time(), $stackId]); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | } |
93 | 93 | |
94 | 94 | public function getEtag($type, $id) { |
95 | - $entry = $this->cache->get($type . '-' .$id); |
|
95 | + $entry = $this->cache->get($type . '-' . $id); |
|
96 | 96 | if ($entry === 'null') { |
97 | 97 | return ''; |
98 | 98 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | public function findAll($since = -1) { |
92 | 92 | $userInfo = $this->getBoardPrerequisites(); |
93 | 93 | $userBoards = $this->boardMapper->findAllByUser($userInfo['user'], null, null, $since); |
94 | - $groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'],null, null, $since); |
|
94 | + $groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'], null, null, $since); |
|
95 | 95 | $complete = array_merge($userBoards, $groupBoards); |
96 | 96 | $result = []; |
97 | 97 | foreach ($complete as &$item) { |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | */ |
126 | 126 | public function find($boardId) { |
127 | 127 | |
128 | - if ( is_numeric($boardId) === false ) { |
|
128 | + if (is_numeric($boardId) === false) { |
|
129 | 129 | throw new BadRequestException('board id must be a number'); |
130 | 130 | } |
131 | 131 | |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | */ |
175 | 175 | public function isArchived($mapper, $id) { |
176 | 176 | |
177 | - if (is_numeric($id) === false) { |
|
177 | + if (is_numeric($id) === false) { |
|
178 | 178 | throw new BadRequestException('id must be a number'); |
179 | 179 | } |
180 | 180 | |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | throw new BadRequestException('mapper must be provided'); |
209 | 209 | } |
210 | 210 | |
211 | - if (is_numeric($id) === false) { |
|
211 | + if (is_numeric($id) === false) { |
|
212 | 212 | throw new BadRequestException('id must be a number'); |
213 | 213 | } |
214 | 214 | |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | * @throws BadRequestException |
340 | 340 | */ |
341 | 341 | public function deleteForce($id) { |
342 | - if (is_numeric($id) === false) { |
|
342 | + if (is_numeric($id) === false) { |
|
343 | 343 | throw new BadRequestException('id must be a number'); |
344 | 344 | } |
345 | 345 | |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | throw new BadRequestException('color must be provided'); |
374 | 374 | } |
375 | 375 | |
376 | - if ( is_bool($archived) === false ) { |
|
376 | + if (is_bool($archived) === false) { |
|
377 | 377 | throw new BadRequestException('archived must be a boolean'); |
378 | 378 | } |
379 | 379 |