@@ -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}'); |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | break; |
369 | 369 | } |
370 | 370 | |
371 | - if ($subject === self::SUBJECT_CARD_UPDATE_DESCRIPTION){ |
|
371 | + if ($subject === self::SUBJECT_CARD_UPDATE_DESCRIPTION) { |
|
372 | 372 | $subjectParams['diff'] = true; |
373 | 373 | } |
374 | 374 | if ($subject === self::SUBJECT_CARD_UPDATE_STACKID) { |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | $event->setApp('deck') |
380 | 380 | ->setType('deck') |
381 | 381 | ->setAuthor($this->userId) |
382 | - ->setObject($objectType, (int)$object->getId(), $object->getTitle()) |
|
382 | + ->setObject($objectType, (int) $object->getId(), $object->getTitle()) |
|
383 | 383 | ->setSubject($subject, array_merge($subjectParams, $additionalParams)) |
384 | 384 | ->setTimestamp(time()); |
385 | 385 | |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | $objectId = $entity->getObjectId(); |
441 | 441 | break; |
442 | 442 | default: |
443 | - throw new InvalidArgumentException('No entity relation present for '. $className . ' to ' . $objectType); |
|
443 | + throw new InvalidArgumentException('No entity relation present for ' . $className . ' to ' . $objectType); |
|
444 | 444 | } |
445 | 445 | return $this->cardMapper->find($objectId); |
446 | 446 | } |
@@ -455,11 +455,11 @@ discard block |
||
455 | 455 | $objectId = $entity->getBoardId(); |
456 | 456 | break; |
457 | 457 | default: |
458 | - throw new InvalidArgumentException('No entity relation present for '. $className . ' to ' . $objectType); |
|
458 | + throw new InvalidArgumentException('No entity relation present for ' . $className . ' to ' . $objectType); |
|
459 | 459 | } |
460 | 460 | return $this->boardMapper->find($objectId); |
461 | 461 | } |
462 | - throw new InvalidArgumentException('No entity relation present for '. $className . ' to ' . $objectType); |
|
462 | + throw new InvalidArgumentException('No entity relation present for ' . $className . ' to ' . $objectType); |
|
463 | 463 | } |
464 | 464 | |
465 | 465 | private function findDetailsForStack($stackId) { |
@@ -43,12 +43,12 @@ discard block |
||
43 | 43 | * @param CommentsEvent $event |
44 | 44 | */ |
45 | 45 | public function handle(CommentsEvent $event) { |
46 | - if($event->getComment()->getObjectType() !== 'deckCard') { |
|
46 | + if ($event->getComment()->getObjectType() !== 'deckCard') { |
|
47 | 47 | return; |
48 | 48 | } |
49 | 49 | |
50 | 50 | $eventType = $event->getEvent(); |
51 | - if( $eventType === CommentsEvent::EVENT_ADD |
|
51 | + if ($eventType === CommentsEvent::EVENT_ADD |
|
52 | 52 | ) { |
53 | 53 | $this->notificationHandler($event); |
54 | 54 | $this->activityHandler($event); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | CommentsEvent::EVENT_UPDATE, |
61 | 61 | CommentsEvent::EVENT_DELETE, |
62 | 62 | ]; |
63 | - if(in_array($eventType, $applicableEvents)) { |
|
63 | + if (in_array($eventType, $applicableEvents)) { |
|
64 | 64 | $this->notificationHandler($event); |
65 | 65 | return; |
66 | 66 | } |
@@ -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 |