Passed
Pull Request — master (#946)
by Julius
02:11
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/Service/BoardService.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  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);
99
+		$groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'], null, null, $since);
100 100
 		$complete = array_merge($userBoards, $groupBoards);
101 101
 		$result = [];
102 102
 		/** @var Board $item */
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	 */
133 133
 	public function find($boardId) {
134 134
 
135
-		if ( is_numeric($boardId) === false ) {
135
+		if (is_numeric($boardId) === false) {
136 136
 			throw new BadRequestException('board id must be a number');
137 137
 		}
138 138
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 	 */
182 182
 	public function isArchived($mapper, $id) {
183 183
 
184
-		if (is_numeric($id) === false)  {
184
+		if (is_numeric($id) === false) {
185 185
 			throw new BadRequestException('id must be a number');
186 186
 		}
187 187
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 			throw new BadRequestException('mapper must be provided');
216 216
 		}
217 217
 
218
-		if (is_numeric($id) === false)  {
218
+		if (is_numeric($id) === false) {
219 219
 			throw new BadRequestException('id must be a number');
220 220
 		}
221 221
 
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 	 * @throws BadRequestException
354 354
 	 */
355 355
 	public function deleteForce($id) {
356
-		if (is_numeric($id) === false)  {
356
+		if (is_numeric($id) === false) {
357 357
 			throw new BadRequestException('id must be a number');
358 358
 		}
359 359
 
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 			throw new BadRequestException('color must be provided');
388 388
 		}
389 389
 
390
-		if ( is_bool($archived) === false ) {
390
+		if (is_bool($archived) === false) {
391 391
 			throw new BadRequestException('archived must be a boolean');
392 392
 		}
393 393
 
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
 	private function enrichWithStacks($board, $since = -1) {
536 536
 		$stacks = $this->stackMapper->findAll($board->getId(), null, null, $since);
537 537
 
538
-		if(\count($stacks) === 0) {
538
+		if (\count($stacks) === 0) {
539 539
 			return;
540 540
 		}
541 541
 
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/AppInfo/Application.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	}
148 148
 
149 149
 	protected function registerCommentsEventHandler() {
150
-		$this->getContainer()->getServer()->getCommentsManager()->registerEventHandler(function () {
150
+		$this->getContainer()->getServer()->getCommentsManager()->registerEventHandler(function() {
151 151
 			return $this->getContainer()->query(CommentEventHandler::class);
152 152
 		});
153 153
 	}
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 		/** @var IManager $resourceManager */
160 160
 		$resourceManager = $this->getContainer()->query(IManager::class);
161 161
 		$resourceManager->registerResourceProvider(ResourceProvider::class);
162
-		\OC::$server->getEventDispatcher()->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', function () {
162
+		\OC::$server->getEventDispatcher()->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', function() {
163 163
 			\OCP\Util::addScript('deck', 'build/collections');
164 164
 		});
165 165
 	}
Please login to merge, or discard this patch.