Passed
Pull Request — master (#665)
by Julius
06:37
created
lib/Service/BoardService.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@
 block discarded – undo
147 147
 	}
148 148
 
149 149
 	/**
150
-	 * @return array
150
+	 * @return integer
151 151
 	 */
152 152
 	private function getBoardPrerequisites() {
153 153
 		$groups = $this->groupManager->getUserGroupIds(
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	public function findAll($since = 0) {
88 88
 		$userInfo = $this->getBoardPrerequisites();
89 89
 		$userBoards = $this->boardMapper->findAllByUser($userInfo['user'], null, null, $since);
90
-		$groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'],null, null,  $since);
90
+		$groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'], null, null, $since);
91 91
 		$complete = array_merge($userBoards, $groupBoards);
92 92
 		$result = [];
93 93
 		foreach ($complete as &$item) {
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	public function find($boardId) {
123 123
 
124
-		if ( is_numeric($boardId) === false ) {
124
+		if (is_numeric($boardId) === false) {
125 125
 			throw new BadRequestException('board id must be a number');
126 126
 		}
127 127
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 	 */
171 171
 	public function isArchived($mapper, $id) {
172 172
 
173
-		if (is_numeric($id) === false)  {
173
+		if (is_numeric($id) === false) {
174 174
 			throw new BadRequestException('id must be a number');
175 175
 		}
176 176
 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 			throw new BadRequestException('mapper must be provided');
205 205
 		}
206 206
 
207
-		if (is_numeric($id) === false)  {
207
+		if (is_numeric($id) === false) {
208 208
 			throw new BadRequestException('id must be a number');
209 209
 		}
210 210
 
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 	 * @throws BadRequestException
333 333
 	 */
334 334
 	public function deleteForce($id) {
335
-		if (is_numeric($id) === false)  {
335
+		if (is_numeric($id) === false) {
336 336
 			throw new BadRequestException('id must be a number');
337 337
 		}
338 338
 
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 			throw new BadRequestException('color must be provided');
367 367
 		}
368 368
 
369
-		if ( is_bool($archived) === false ) {
369
+		if (is_bool($archived) === false) {
370 370
 			throw new BadRequestException('archived must be a boolean');
371 371
 		}
372 372
 
Please login to merge, or discard this patch.
lib/Controller/CardApiController.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,10 +31,10 @@
 block discarded – undo
31 31
  use OCA\Deck\Service\CardService;
32 32
 
33 33
  /**
34
- * Class BoardApiController
35
- *
36
- * @package OCA\Deck\Controller
37
- */
34
+  * Class BoardApiController
35
+  *
36
+  * @package OCA\Deck\Controller
37
+  */
38 38
 class CardApiController extends ApiController {
39 39
 	private $cardService;
40 40
 	private $userId;
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 2 patches
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -23,13 +23,9 @@
 block discarded – undo
23 23
 
24 24
 namespace OCA\Deck\Db;
25 25
 
26
-use OCP\AppFramework\Db\DoesNotExistException;
27
-use OCP\ICache;
28 26
 use OCP\ICacheFactory;
29 27
 use OCP\IDBConnection;
30 28
 use OCP\IRequest;
31
-use OCP\IUserManager;
32
-use OCP\IGroupManager;
33 29
 
34 30
 class ChangeHelper {
35 31
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 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]);
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 	}
82 82
 
83 83
 	public function getEtag($type, $id) {
84
-		return $this->cache->get($type . '-' .$id) ?? '123';
84
+		return $this->cache->get($type . '-' . $id) ?? '123';
85 85
 	}
86 86
 
87 87
 }
Please login to merge, or discard this patch.