@@ -152,7 +152,7 @@ discard block |
||
| 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 |
||
| 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); |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | break; |
| 382 | 382 | } |
| 383 | 383 | |
| 384 | - if ($subject === self::SUBJECT_CARD_UPDATE_DESCRIPTION){ |
|
| 384 | + if ($subject === self::SUBJECT_CARD_UPDATE_DESCRIPTION) { |
|
| 385 | 385 | $message = $additionalParams['after']; |
| 386 | 386 | } |
| 387 | 387 | |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | $event->setApp('deck') |
| 390 | 390 | ->setType('deck') |
| 391 | 391 | ->setAuthor($this->userId) |
| 392 | - ->setObject($objectType, (int)$object->getId(), $object->getTitle()) |
|
| 392 | + ->setObject($objectType, (int) $object->getId(), $object->getTitle()) |
|
| 393 | 393 | ->setSubject($subject, array_merge($subjectParams, $additionalParams)) |
| 394 | 394 | ->setTimestamp(time()); |
| 395 | 395 | |
@@ -121,7 +121,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -21,7 +21,7 @@ |
||
| 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 | |
@@ -76,7 +76,7 @@ discard block |
||
| 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 |
||
| 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 | |