Passed
Push — master ( aa725e...8615fe )
by Julius
03:34 queued 18s
created
lib/Activity/ActivityManager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
lib/Activity/CommentEventHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
lib/Activity/DeckProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -281,11 +281,11 @@
 block discarded – undo
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()
Please login to merge, or discard this patch.
lib/Service/LabelService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 				}
Please login to merge, or discard this patch.
lib/Controller/CardApiController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Collaboration/Resources/ResourceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
 		} catch (QueryException $e) {
125 125
 		}
126 126
 		if ($boardId !== null) {
127
-			$resource = $resourceManager->getResourceForUser(self::RESOURCE_TYPE, (string)$boardId, null);
127
+			$resource = $resourceManager->getResourceForUser(self::RESOURCE_TYPE, (string) $boardId, null);
128 128
 			$resourceManager->invalidateAccessCacheForResource($resource);
129 129
 		} else {
130 130
 			$resourceManager->invalidateAccessCacheForProvider($this);
Please login to merge, or discard this patch.
lib/Service/BoardService.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/AppInfo/Application.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 	 * @throws \OCP\AppFramework\QueryException
156 156
 	 */
157 157
 	protected function registerCommentsEventHandler() {
158
-		$this->getContainer()->getServer()->getCommentsManager()->registerEventHandler(function () {
158
+		$this->getContainer()->getServer()->getCommentsManager()->registerEventHandler(function() {
159 159
 			return $this->getContainer()->query(CommentEventHandler::class);
160 160
 		});
161 161
 	}
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 		/** @var IManager $resourceManager */
176 176
 		$resourceManager = $this->getContainer()->query(IManager::class);
177 177
 		$resourceManager->registerResourceProvider(\OCA\Deck\Collaboration\Resources\ResourceProvider::class);
178
-		\OC::$server->getEventDispatcher()->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', function () {
178
+		\OC::$server->getEventDispatcher()->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', function() {
179 179
 			\OCP\Util::addScript('deck', 'build/collections');
180 180
 		});
181 181
 	}
Please login to merge, or discard this patch.