@@ -43,7 +43,7 @@ |
||
| 43 | 43 | private $cardMapper; |
| 44 | 44 | |
| 45 | 45 | public function __construct(ActivityManager $activityManager, CardMapper $cardMapper) { |
| 46 | - $this->activityManager = $activityManager; |
|
| 46 | + $this->activityManager = $activityManager; |
|
| 47 | 47 | $this->cardMapper = $cardMapper; |
| 48 | 48 | } |
| 49 | 49 | |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | $subject = ''; |
| 134 | 134 | switch ($subjectIdentifier) { |
| 135 | 135 | case self::SUBJECT_BOARD_CREATE: |
| 136 | - $subject = $ownActivity ? $this->l10n->t('You have created a new board {board}'): $this->l10n->t('{user} has created a new board {board}'); |
|
| 136 | + $subject = $ownActivity ? $this->l10n->t('You have created a new board {board}') : $this->l10n->t('{user} has created a new board {board}'); |
|
| 137 | 137 | break; |
| 138 | 138 | case self::SUBJECT_BOARD_DELETE: |
| 139 | 139 | $subject = $ownActivity ? $this->l10n->t('You have deleted the board {board}') : $this->l10n->t('{user} has deleted the board {board}'); |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | break; |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | - if ($subject === self::SUBJECT_CARD_UPDATE_DESCRIPTION){ |
|
| 376 | + if ($subject === self::SUBJECT_CARD_UPDATE_DESCRIPTION) { |
|
| 377 | 377 | $card = $subjectParams['card']; |
| 378 | 378 | if ($card->getLastEditor() === $this->userId) { |
| 379 | 379 | return null; |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | $event->setApp('deck') |
| 393 | 393 | ->setType($eventType) |
| 394 | 394 | ->setAuthor($author === null ? $this->userId : $author) |
| 395 | - ->setObject($objectType, (int)$object->getId(), $object->getTitle()) |
|
| 395 | + ->setObject($objectType, (int) $object->getId(), $object->getTitle()) |
|
| 396 | 396 | ->setSubject($subject, array_merge($subjectParams, $additionalParams)) |
| 397 | 397 | ->setTimestamp(time()); |
| 398 | 398 | |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | $objectId = $entity->getObjectId(); |
| 454 | 454 | break; |
| 455 | 455 | default: |
| 456 | - throw new InvalidArgumentException('No entity relation present for '. $className . ' to ' . $objectType); |
|
| 456 | + throw new InvalidArgumentException('No entity relation present for ' . $className . ' to ' . $objectType); |
|
| 457 | 457 | } |
| 458 | 458 | return $this->cardMapper->find($objectId); |
| 459 | 459 | } |
@@ -468,11 +468,11 @@ discard block |
||
| 468 | 468 | $objectId = $entity->getBoardId(); |
| 469 | 469 | break; |
| 470 | 470 | default: |
| 471 | - throw new InvalidArgumentException('No entity relation present for '. $className . ' to ' . $objectType); |
|
| 471 | + throw new InvalidArgumentException('No entity relation present for ' . $className . ' to ' . $objectType); |
|
| 472 | 472 | } |
| 473 | 473 | return $this->boardMapper->find($objectId); |
| 474 | 474 | } |
| 475 | - throw new InvalidArgumentException('No entity relation present for '. $className . ' to ' . $objectType); |
|
| 475 | + throw new InvalidArgumentException('No entity relation present for ' . $className . ' to ' . $objectType); |
|
| 476 | 476 | } |
| 477 | 477 | |
| 478 | 478 | private function findDetailsForStack($stackId) { |
@@ -50,12 +50,12 @@ discard block |
||
| 50 | 50 | * @param CommentsEvent $event |
| 51 | 51 | */ |
| 52 | 52 | public function handle(CommentsEvent $event) { |
| 53 | - if($event->getComment()->getObjectType() !== 'deckCard') { |
|
| 53 | + if ($event->getComment()->getObjectType() !== 'deckCard') { |
|
| 54 | 54 | return; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | $eventType = $event->getEvent(); |
| 58 | - if( $eventType === CommentsEvent::EVENT_ADD |
|
| 58 | + if ($eventType === CommentsEvent::EVENT_ADD |
|
| 59 | 59 | ) { |
| 60 | 60 | $this->notificationHandler($event); |
| 61 | 61 | $this->activityHandler($event); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | $applicableEvents = [ |
| 66 | 66 | CommentsEvent::EVENT_UPDATE |
| 67 | 67 | ]; |
| 68 | - if(in_array($eventType, $applicableEvents)) { |
|
| 68 | + if (in_array($eventType, $applicableEvents)) { |
|
| 69 | 69 | $this->notificationHandler($event); |
| 70 | 70 | return; |
| 71 | 71 | } |
@@ -281,11 +281,11 @@ |
||
| 281 | 281 | if (array_key_exists('comment', $subjectParams)) { |
| 282 | 282 | /** @var IComment $comment */ |
| 283 | 283 | try { |
| 284 | - $comment = $this->commentsManager->get((int)$subjectParams['comment']); |
|
| 284 | + $comment = $this->commentsManager->get((int) $subjectParams['comment']); |
|
| 285 | 285 | $event->setParsedMessage($comment->getMessage()); |
| 286 | 286 | } catch (NotFoundException $e) { |
| 287 | 287 | } |
| 288 | - $params['comment'] =[ |
|
| 288 | + $params['comment'] = [ |
|
| 289 | 289 | 'type' => 'highlight', |
| 290 | 290 | 'id' => $subjectParams['comment'], |
| 291 | 291 | 'name' => $comment->getMessage() |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | |
| 95 | 95 | $boardLabels = $this->labelMapper->findAll($boardId); |
| 96 | 96 | if (\is_array($boardLabels)) { |
| 97 | - foreach($boardLabels as $boardLabel) { |
|
| 97 | + foreach ($boardLabels as $boardLabel) { |
|
| 98 | 98 | if ($boardLabel->getTitle() === $title) { |
| 99 | 99 | throw new BadRequestException('title must be unique'); |
| 100 | 100 | break; |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | |
| 169 | 169 | $boardLabels = $this->labelMapper->findAll($label->getBoardId()); |
| 170 | 170 | if (\is_array($boardLabels)) { |
| 171 | - foreach($boardLabels as $boardLabel) { |
|
| 171 | + foreach ($boardLabels as $boardLabel) { |
|
| 172 | 172 | if ($boardLabel->getId() === $label->getId()) { |
| 173 | 173 | continue; |
| 174 | 174 | } |
@@ -147,7 +147,7 @@ |
||
| 147 | 147 | * Assign a user to a card |
| 148 | 148 | */ |
| 149 | 149 | public function assignUser($userId) { |
| 150 | - $card = $this->cardService->assignUser($this->request->getParam('cardId'), $userId);; |
|
| 150 | + $card = $this->cardService->assignUser($this->request->getParam('cardId'), $userId); ; |
|
| 151 | 151 | return new DataResponse($card, HTTP::STATUS_OK); |
| 152 | 152 | } |
| 153 | 153 | |
@@ -96,8 +96,8 @@ discard block |
||
| 96 | 96 | public function findAll($since = 0) { |
| 97 | 97 | $userInfo = $this->getBoardPrerequisites(); |
| 98 | 98 | $userBoards = $this->boardMapper->findAllByUser($userInfo['user'], null, null, $since); |
| 99 | - $groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'],null, null, $since); |
|
| 100 | - $circleBoards = $this->boardMapper->findAllByCircles($userInfo['user'], null, null, $since); |
|
| 99 | + $groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'], null, null, $since); |
|
| 100 | + $circleBoards = $this->boardMapper->findAllByCircles($userInfo['user'], null, null, $since); |
|
| 101 | 101 | $complete = array_merge($userBoards, $groupBoards, $circleBoards); |
| 102 | 102 | $result = []; |
| 103 | 103 | /** @var Board $item */ |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | */ |
| 134 | 134 | public function find($boardId) { |
| 135 | 135 | |
| 136 | - if ( is_numeric($boardId) === false ) { |
|
| 136 | + if (is_numeric($boardId) === false) { |
|
| 137 | 137 | throw new BadRequestException('board id must be a number'); |
| 138 | 138 | } |
| 139 | 139 | |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | */ |
| 183 | 183 | public function isArchived($mapper, $id) { |
| 184 | 184 | |
| 185 | - if (is_numeric($id) === false) { |
|
| 185 | + if (is_numeric($id) === false) { |
|
| 186 | 186 | throw new BadRequestException('id must be a number'); |
| 187 | 187 | } |
| 188 | 188 | |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | throw new BadRequestException('mapper must be provided'); |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | - if (is_numeric($id) === false) { |
|
| 219 | + if (is_numeric($id) === false) { |
|
| 220 | 220 | throw new BadRequestException('id must be a number'); |
| 221 | 221 | } |
| 222 | 222 | |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | * @throws BadRequestException |
| 355 | 355 | */ |
| 356 | 356 | public function deleteForce($id) { |
| 357 | - if (is_numeric($id) === false) { |
|
| 357 | + if (is_numeric($id) === false) { |
|
| 358 | 358 | throw new BadRequestException('id must be a number'); |
| 359 | 359 | } |
| 360 | 360 | |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | throw new BadRequestException('color must be provided'); |
| 389 | 389 | } |
| 390 | 390 | |
| 391 | - if ( is_bool($archived) === false ) { |
|
| 391 | + if (is_bool($archived) === false) { |
|
| 392 | 392 | throw new BadRequestException('archived must be a boolean'); |
| 393 | 393 | } |
| 394 | 394 | |
@@ -536,7 +536,7 @@ discard block |
||
| 536 | 536 | private function enrichWithStacks($board, $since = -1) { |
| 537 | 537 | $stacks = $this->stackMapper->findAll($board->getId(), null, null, $since); |
| 538 | 538 | |
| 539 | - if(\count($stacks) === 0) { |
|
| 539 | + if (\count($stacks) === 0) { |
|
| 540 | 540 | return; |
| 541 | 541 | } |
| 542 | 542 | |