Passed
Pull Request — master (#607)
by Julius
02:40
created
lib/Activity/ActivityManager.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 	}
153 153
 
154 154
 	/**
155
-	 * @param $subjectIdentifier
155
+	 * @param string $subjectIdentifier
156 156
 	 * @param array $subjectParams
157 157
 	 * @param bool $ownActivity
158 158
 	 * @return string
@@ -263,6 +263,9 @@  discard block
 block discarded – undo
263 263
 		return $subject;
264 264
 	}
265 265
 
266
+	/**
267
+	 * @param \OCP\AppFramework\Db\Entity $entity
268
+	 */
266 269
 	public function triggerEvent($objectType, $entity, $subject, $additionalParams = []) {
267 270
 		try {
268 271
 			$event = $this->createEvent($objectType, $entity, $subject, $additionalParams);
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 		$subject = '';
129 129
 		switch ($subjectIdentifier) {
130 130
 			case self::SUBJECT_BOARD_CREATE:
131
-				$subject = $ownActivity ? $this->l10n->t('You have created a new board {board}'): $this->l10n->t('{user} has created a new board {board}');
131
+				$subject = $ownActivity ? $this->l10n->t('You have created a new board {board}') : $this->l10n->t('{user} has created a new board {board}');
132 132
 				break;
133 133
 			case self::SUBJECT_BOARD_DELETE:
134 134
 				$subject = $ownActivity ? $this->l10n->t('You have deleted the board {board}') : $this->l10n->t('{user} has deleted the board {board}');
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 				break;
349 349
 		}
350 350
 
351
-		if ($subject === self::SUBJECT_CARD_UPDATE_DESCRIPTION){
351
+		if ($subject === self::SUBJECT_CARD_UPDATE_DESCRIPTION) {
352 352
 			// TODO: Use ChangeSet and getDiff method
353 353
 			$message = $additionalParams['after'];
354 354
 		}
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 		$event->setApp('deck')
358 358
 			->setType('deck')
359 359
 			->setAuthor($this->userId)
360
-			->setObject($objectType, (int)$object->getId(), $object->getTitle())
360
+			->setObject($objectType, (int) $object->getId(), $object->getTitle())
361 361
 			->setSubject($subject, array_merge($subjectParams, $additionalParams))
362 362
 			->setTimestamp(time());
363 363
 
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 					$objectId = $entity->getCardId();
413 413
 					break;
414 414
 				default:
415
-					throw new InvalidArgumentException('No entity relation present for '. $className . ' to ' . $objectType);
415
+					throw new InvalidArgumentException('No entity relation present for ' . $className . ' to ' . $objectType);
416 416
 			}
417 417
 			return $this->cardMapper->find($objectId);
418 418
 		}
@@ -426,11 +426,11 @@  discard block
 block discarded – undo
426 426
 					$objectId = $entity->getBoardId();
427 427
 					break;
428 428
 				default:
429
-					throw new InvalidArgumentException('No entity relation present for '. $className . ' to ' . $objectType);
429
+					throw new InvalidArgumentException('No entity relation present for ' . $className . ' to ' . $objectType);
430 430
 			}
431 431
 			return $this->boardMapper->find($objectId);
432 432
 		}
433
-		throw new InvalidArgumentException('No entity relation present for '. $className . ' to ' . $objectType);
433
+		throw new InvalidArgumentException('No entity relation present for ' . $className . ' to ' . $objectType);
434 434
 	}
435 435
 
436 436
 	private function findDetailsForStack($stackId) {
Please login to merge, or discard this patch.
lib/Service/BoardService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	public function find($boardId) {
123 123
 
124
-		if ( is_numeric($boardId) === false ) {
124
+		if (is_numeric($boardId) === false) {
125 125
 			throw new BadRequestException('board id must be a number');
126 126
 		}
127 127
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 	 */
171 171
 	public function isArchived($mapper, $id) {
172 172
 
173
-		if (is_numeric($id) === false)  {
173
+		if (is_numeric($id) === false) {
174 174
 			throw new BadRequestException('id must be a number');
175 175
 		}
176 176
 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 			throw new BadRequestException('mapper must be provided');
205 205
 		}
206 206
 
207
-		if (is_numeric($id) === false)  {
207
+		if (is_numeric($id) === false) {
208 208
 			throw new BadRequestException('id must be a number');
209 209
 		}
210 210
 
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 	 * @throws BadRequestException
336 336
 	 */
337 337
 	public function deleteForce($id) {
338
-		if (is_numeric($id) === false)  {
338
+		if (is_numeric($id) === false) {
339 339
 			throw new BadRequestException('id must be a number');
340 340
 		}
341 341
 
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 			throw new BadRequestException('color must be provided');
370 370
 		}
371 371
 
372
-		if ( is_bool($archived) === false ) {
372
+		if (is_bool($archived) === false) {
373 373
 			throw new BadRequestException('archived must be a boolean');
374 374
 		}
375 375
 
Please login to merge, or discard this patch.
appinfo/app.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
  *
22 22
  */
23 23
 
24
-if ((@include_once __DIR__ . '/../vendor/autoload.php')===false) {
24
+if ((@include_once __DIR__ . '/../vendor/autoload.php') === false) {
25 25
 	throw new Exception('Cannot include autoload. Did you run install dependencies using composer?');
26 26
 }
27 27
 
Please login to merge, or discard this patch.
lib/Service/StackService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	private function enrichStackWithCards($stack) {
77 77
 		$cards = $this->cardMapper->findAll($stack->getId());
78 78
 
79
-		if(is_null($cards)) {
79
+		if (is_null($cards)) {
80 80
 			return;
81 81
 		}
82 82
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 	 */
216 216
 	public function delete($id) {
217 217
 
218
-		if ( is_numeric($id) === false ) {
218
+		if (is_numeric($id) === false) {
219 219
 			throw new BadRequestException('stack id must be a number');
220 220
 		}
221 221
 
Please login to merge, or discard this patch.
lib/Activity/DeckProvider.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -204,6 +204,9 @@
 block discarded – undo
204 204
 		return $event;
205 205
 	}
206 206
 
207
+	/**
208
+	 * @param string $endpoint
209
+	 */
207 210
 	public function deckUrl($endpoint) {
208 211
 		return $this->urlGenerator->linkToRoute('deck.page.index') . '#!' . $endpoint;
209 212
 	}
Please login to merge, or discard this patch.