@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |
164 | - * @return array |
|
164 | + * @return integer |
|
165 | 165 | */ |
166 | 166 | private function getBoardPrerequisites() { |
167 | 167 | $groups = $this->groupManager->getUserGroupIds( |
@@ -535,6 +535,9 @@ discard block |
||
535 | 535 | return $this->aclMapper->delete($acl); |
536 | 536 | } |
537 | 537 | |
538 | + /** |
|
539 | + * @param Board $board |
|
540 | + */ |
|
538 | 541 | private function enrichWithStacks($board, $since = -1) { |
539 | 542 | $stacks = $this->stackMapper->findAll($board->getId(), null, null, $since); |
540 | 543 | |
@@ -545,6 +548,9 @@ discard block |
||
545 | 548 | $board->setStacks($stacks); |
546 | 549 | } |
547 | 550 | |
551 | + /** |
|
552 | + * @param Board $board |
|
553 | + */ |
|
548 | 554 | private function enrichWithLabels($board, $since = -1) { |
549 | 555 | $labels = $this->labelMapper->findAll($board->getId(), null, null, $since); |
550 | 556 | |
@@ -555,6 +561,9 @@ discard block |
||
555 | 561 | $board->setLabels($labels); |
556 | 562 | } |
557 | 563 | |
564 | + /** |
|
565 | + * @param Board $board |
|
566 | + */ |
|
558 | 567 | private function enrichWithUsers($board, $since = -1) { |
559 | 568 | $boardUsers = $this->permissionService->findUsers($board->getId()); |
560 | 569 | if(\count($boardUsers) === 0) { |
@@ -97,8 +97,8 @@ discard block |
||
97 | 97 | public function findAll($since = 0, $details = null) { |
98 | 98 | $userInfo = $this->getBoardPrerequisites(); |
99 | 99 | $userBoards = $this->boardMapper->findAllByUser($userInfo['user'], null, null, $since); |
100 | - $groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'],null, null, $since); |
|
101 | - $circleBoards = $this->boardMapper->findAllByCircles($userInfo['user'], null, null, $since); |
|
100 | + $groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'], null, null, $since); |
|
101 | + $circleBoards = $this->boardMapper->findAllByCircles($userInfo['user'], null, null, $since); |
|
102 | 102 | $complete = array_merge($userBoards, $groupBoards, $circleBoards); |
103 | 103 | $result = []; |
104 | 104 | /** @var Board $item */ |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function find($boardId) { |
140 | 140 | |
141 | - if ( is_numeric($boardId) === false ) { |
|
141 | + if (is_numeric($boardId) === false) { |
|
142 | 142 | throw new BadRequestException('board id must be a number'); |
143 | 143 | } |
144 | 144 | |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | */ |
187 | 187 | public function isArchived($mapper, $id) { |
188 | 188 | |
189 | - if (is_numeric($id) === false) { |
|
189 | + if (is_numeric($id) === false) { |
|
190 | 190 | throw new BadRequestException('id must be a number'); |
191 | 191 | } |
192 | 192 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | throw new BadRequestException('mapper must be provided'); |
221 | 221 | } |
222 | 222 | |
223 | - if (is_numeric($id) === false) { |
|
223 | + if (is_numeric($id) === false) { |
|
224 | 224 | throw new BadRequestException('id must be a number'); |
225 | 225 | } |
226 | 226 | |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | * @throws BadRequestException |
359 | 359 | */ |
360 | 360 | public function deleteForce($id) { |
361 | - if (is_numeric($id) === false) { |
|
361 | + if (is_numeric($id) === false) { |
|
362 | 362 | throw new BadRequestException('id must be a number'); |
363 | 363 | } |
364 | 364 | |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | throw new BadRequestException('color must be provided'); |
393 | 393 | } |
394 | 394 | |
395 | - if ( is_bool($archived) === false ) { |
|
395 | + if (is_bool($archived) === false) { |
|
396 | 396 | throw new BadRequestException('archived must be a boolean'); |
397 | 397 | } |
398 | 398 | |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | private function enrichWithStacks($board, $since = -1) { |
555 | 555 | $stacks = $this->stackMapper->findAll($board->getId(), null, null, $since); |
556 | 556 | |
557 | - if(\count($stacks) === 0) { |
|
557 | + if (\count($stacks) === 0) { |
|
558 | 558 | return; |
559 | 559 | } |
560 | 560 | |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | private function enrichWithLabels($board, $since = -1) { |
565 | 565 | $labels = $this->labelMapper->findAll($board->getId(), null, null, $since); |
566 | 566 | |
567 | - if(\count($labels) === 0) { |
|
567 | + if (\count($labels) === 0) { |
|
568 | 568 | return; |
569 | 569 | } |
570 | 570 | |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | |
574 | 574 | private function enrichWithUsers($board, $since = -1) { |
575 | 575 | $boardUsers = $this->permissionService->findUsers($board->getId()); |
576 | - if(\count($boardUsers) === 0) { |
|
576 | + if (\count($boardUsers) === 0) { |
|
577 | 577 | return; |
578 | 578 | } |
579 | 579 | $board->setUsers(array_values($boardUsers)); |