@@ -134,7 +134,7 @@ |
||
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | /** |
| 137 | - * @param $cardId |
|
| 137 | + * @param string $cardId |
|
| 138 | 138 | * @return Board |
| 139 | 139 | * @throws DoesNotExistException |
| 140 | 140 | * @throws MultipleObjectsReturnedException |
@@ -151,7 +151,7 @@ |
||
| 151 | 151 | } catch (QueryException $e) { |
| 152 | 152 | } |
| 153 | 153 | if ($cardId !== null) { |
| 154 | - $resource = $resourceManager->getResourceForUser(self::RESOURCE_TYPE, (string)$cardId, null); |
|
| 154 | + $resource = $resourceManager->getResourceForUser(self::RESOURCE_TYPE, (string) $cardId, null); |
|
| 155 | 155 | $resourceManager->invalidateAccessCacheForResource($resource); |
| 156 | 156 | } else { |
| 157 | 157 | $resourceManager->invalidateAccessCacheForProvider($this); |
@@ -326,8 +326,8 @@ |
||
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | /** |
| 329 | - * @param $id |
|
| 330 | - * @param $order |
|
| 329 | + * @param integer $id |
|
| 330 | + * @param integer $order |
|
| 331 | 331 | * |
| 332 | 332 | * @return array |
| 333 | 333 | * @throws \OCA\Deck\NoPermissionException |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | * @return array |
| 56 | 56 | */ |
| 57 | 57 | public function reorder($cardId, $stackId, $order) { |
| 58 | - return $this->cardService->reorder((int)$cardId, (int)$stackId, (int)$order); |
|
| 58 | + return $this->cardService->reorder((int) $cardId, (int) $stackId, (int) $order); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | * @return array |
| 89 | 89 | */ |
| 90 | 90 | public function reorder($stackId, $order) { |
| 91 | - return $this->stackService->reorder((int)$stackId, (int)$order); |
|
| 91 | + return $this->stackService->reorder((int) $stackId, (int) $order); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | /** |
| 174 | 174 | */ |
| 175 | 175 | protected function registerCommentsEventHandler(): void { |
| 176 | - $this->server->getCommentsManager()->registerEventHandler(function () { |
|
| 176 | + $this->server->getCommentsManager()->registerEventHandler(function() { |
|
| 177 | 177 | return $this->getContainer()->query(CommentEventHandler::class); |
| 178 | 178 | }); |
| 179 | 179 | } |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | $resourceManager->registerResourceProvider(ResourceProvider::class); |
| 200 | 200 | $resourceManager->registerResourceProvider(ResourceProviderCard::class); |
| 201 | 201 | |
| 202 | - $this->server->getEventDispatcher()->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', static function () { |
|
| 202 | + $this->server->getEventDispatcher()->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', static function() { |
|
| 203 | 203 | Util::addScript('deck', 'collections'); |
| 204 | 204 | }); |
| 205 | 205 | } |
@@ -24,7 +24,6 @@ |
||
| 24 | 24 | namespace OCA\Deck\AppInfo; |
| 25 | 25 | |
| 26 | 26 | use Exception; |
| 27 | -use InvalidArgumentException; |
|
| 28 | 27 | use OC_Util; |
| 29 | 28 | use OCA\Deck\Activity\CommentEventHandler; |
| 30 | 29 | use OCA\Deck\Capabilities; |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | private $config; |
| 40 | 40 | private $l10n; |
| 41 | 41 | |
| 42 | - public function __construct( |
|
| 42 | + public function __construct( |
|
| 43 | 43 | IL10N $l10n, |
| 44 | 44 | BoardMapper $boardMapper, |
| 45 | 45 | BoardService $boardService, |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $this->config = $config; |
| 55 | 55 | $this->boardMapper = $boardMapper; |
| 56 | 56 | $this->l10n = $l10n; |
| 57 | - } |
|
| 57 | + } |
|
| 58 | 58 | |
| 59 | 59 | /** |
| 60 | 60 | * Return true if this is the first time a user is acessing their instance with deck enabled |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | return false; |
| 79 | - } |
|
| 79 | + } |
|
| 80 | 80 | |
| 81 | 81 | /** |
| 82 | 82 | * @param $title |
@@ -103,9 +103,9 @@ discard block |
||
| 103 | 103 | throw new BadRequestException('color must be provided'); |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - $defaultBoard = $this->boardService->create($title, $userId, $color); |
|
| 107 | - $defaultStacks = []; |
|
| 108 | - $defaultCards = []; |
|
| 106 | + $defaultBoard = $this->boardService->create($title, $userId, $color); |
|
| 107 | + $defaultStacks = []; |
|
| 108 | + $defaultCards = []; |
|
| 109 | 109 | |
| 110 | 110 | $boardId = $defaultBoard->getId(); |
| 111 | 111 | |
@@ -118,5 +118,5 @@ discard block |
||
| 118 | 118 | $defaultCards[] = $this->cardService->create($this->l10n->t('Example Task 1'), $defaultStacks[2]->getId(), 'text', 0, $userId); |
| 119 | 119 | |
| 120 | 120 | return $defaultBoard; |
| 121 | - } |
|
| 121 | + } |
|
| 122 | 122 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | use OCA\Deck\AppInfo\Application; |
| 25 | 25 | use OCP\AppFramework\QueryException; |
| 26 | 26 | |
| 27 | -if ((@include_once __DIR__ . '/../vendor/autoload.php')=== false) { |
|
| 27 | +if ((@include_once __DIR__ . '/../vendor/autoload.php') === false) { |
|
| 28 | 28 | throw new Exception('Cannot include autoload. Did you run install dependencies using composer?'); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -28,7 +28,6 @@ discard block |
||
| 28 | 28 | use OCA\Deck\BadRequestException; |
| 29 | 29 | use OCA\Deck\NoPermissionException; |
| 30 | 30 | use OCA\Deck\NotFoundException; |
| 31 | -use OCA\Deck\StatusException; |
|
| 32 | 31 | use OCP\AppFramework\Http\DataResponse; |
| 33 | 32 | use OCP\Comments\IComment; |
| 34 | 33 | use OCP\Comments\ICommentsManager; |
@@ -37,7 +36,6 @@ discard block |
||
| 37 | 36 | use OCP\ILogger; |
| 38 | 37 | use OCP\IUserManager; |
| 39 | 38 | use OutOfBoundsException; |
| 40 | -use Sabre\DAV\Exception\Forbidden; |
|
| 41 | 39 | use function is_numeric; |
| 42 | 40 | |
| 43 | 41 | class CommentService { |
@@ -127,6 +127,6 @@ |
||
| 127 | 127 | ['name' => 'comments_api#update', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}/comments/{commentId}', 'verb' => 'PUT'], |
| 128 | 128 | ['name' => 'comments_api#delete', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}/comments/{commentId}', 'verb' => 'DELETE'], |
| 129 | 129 | |
| 130 | - ['name' => 'board_api#preflighted_cors', 'url' => '/api/v1.0/{path}','verb' => 'OPTIONS', 'requirements' => ['path' => '.+']], |
|
| 130 | + ['name' => 'board_api#preflighted_cors', 'url' => '/api/v1.0/{path}', 'verb' => 'OPTIONS', 'requirements' => ['path' => '.+']], |
|
| 131 | 131 | ] |
| 132 | 132 | ]; |