@@ -63,7 +63,7 @@ |
||
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 |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | public function cardChanged($cardId, $updateCard = true) { |
62 | 62 | $time = time(); |
63 | 63 | $etag = md5($time . microtime()); |
64 | - $this->cache->set(self::TYPE_CARD . '-' .$cardId, $etag); |
|
64 | + $this->cache->set(self::TYPE_CARD . '-' . $cardId, $etag); |
|
65 | 65 | if ($updateCard) { |
66 | 66 | $sql = 'UPDATE `*PREFIX*deck_cards` SET `last_modified` = ?, `last_editor` = ? WHERE `id` = ?'; |
67 | 67 | $this->db->executeUpdate($sql, [time(), $this->userId, $cardId]); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | public function stackChanged($stackId, $updateBoard = true) { |
79 | 79 | $time = time(); |
80 | 80 | $etag = md5($time . microtime()); |
81 | - $this->cache->set(self::TYPE_CARD . '-' .$stackId, $etag); |
|
81 | + $this->cache->set(self::TYPE_CARD . '-' . $stackId, $etag); |
|
82 | 82 | if ($updateBoard) { |
83 | 83 | $sql = 'UPDATE `*PREFIX*deck_stacks` SET `last_modified` = ? WHERE `id` = ?'; |
84 | 84 | $this->db->executeUpdate($sql, [time(), $stackId]); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | } |
95 | 95 | |
96 | 96 | public function getEtag($type, $id) { |
97 | - $entry = $this->cache->get($type . '-' .$id); |
|
97 | + $entry = $this->cache->get($type . '-' . $id); |
|
98 | 98 | if ($entry === 'null') { |
99 | 99 | return ''; |
100 | 100 | } |
@@ -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() |