Completed
Pull Request — master (#761)
by Julius
02:24
created
lib/Service/CardService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Service/StackService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Db/ChangeHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
lib/Service/BoardService.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	public function findAll($since = -1) {
93 93
 		$userInfo = $this->getBoardPrerequisites();
94 94
 		$userBoards = $this->boardMapper->findAllByUser($userInfo['user'], null, null, $since);
95
-		$groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'],null, null,  $since);
95
+		$groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'], null, null, $since);
96 96
 		$complete = array_merge($userBoards, $groupBoards);
97 97
 		$result = [];
98 98
 		/** @var Board $item */
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	 */
128 128
 	public function find($boardId) {
129 129
 
130
-		if ( is_numeric($boardId) === false ) {
130
+		if (is_numeric($boardId) === false) {
131 131
 			throw new BadRequestException('board id must be a number');
132 132
 		}
133 133
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 */
177 177
 	public function isArchived($mapper, $id) {
178 178
 
179
-		if (is_numeric($id) === false)  {
179
+		if (is_numeric($id) === false) {
180 180
 			throw new BadRequestException('id must be a number');
181 181
 		}
182 182
 
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 			throw new BadRequestException('mapper must be provided');
211 211
 		}
212 212
 
213
-		if (is_numeric($id) === false)  {
213
+		if (is_numeric($id) === false) {
214 214
 			throw new BadRequestException('id must be a number');
215 215
 		}
216 216
 
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 	 * @throws BadRequestException
346 346
 	 */
347 347
 	public function deleteForce($id) {
348
-		if (is_numeric($id) === false)  {
348
+		if (is_numeric($id) === false) {
349 349
 			throw new BadRequestException('id must be a number');
350 350
 		}
351 351
 
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 			throw new BadRequestException('color must be provided');
380 380
 		}
381 381
 
382
-		if ( is_bool($archived) === false ) {
382
+		if (is_bool($archived) === false) {
383 383
 			throw new BadRequestException('archived must be a boolean');
384 384
 		}
385 385
 
Please login to merge, or discard this patch.
lib/Controller/PageController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 	public function index() {
64 64
 		$params = [
65 65
 			'user' => $this->userId,
66
-			'maxUploadSize' => (int)\OCP\Util::uploadLimit(),
66
+			'maxUploadSize' => (int) \OCP\Util::uploadLimit(),
67 67
 			'canCreate' => $this->permissionService->canCreate()
68 68
 		];
69 69
 
Please login to merge, or discard this patch.