Completed
Pull Request — master (#561)
by Kibatic
11:06
created
lib/Service/PermissionService.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
 	/**
90 90
 	 * Get current user permissions for a board
91 91
 	 *
92
-	 * @param Board|Entity $board
92
+	 * @param Board $board
93 93
 	 * @return array|bool
94 94
 	 * @internal param $boardId
95 95
 	 */
Please login to merge, or discard this patch.
lib/Db/AssignedUsersMapper.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 	 * Check if user exists before assigning it to a card
64 64
 	 *
65 65
 	 * @param Entity $entity
66
-	 * @return null|Entity
66
+	 * @return AssignedUsers|null
67 67
 	 */
68 68
 	public function insert(Entity $entity) {
69 69
 		$user = $this->userManager->get($entity->getParticipant());
Please login to merge, or discard this patch.
lib/Service/AttachmentService.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
 	 * @param $cardId
164 164
 	 * @param $attachmentId
165 165
 	 * @param $request
166
-	 * @return mixed
166
+	 * @return \OCP\AppFramework\Db\Entity
167 167
 	 * @throws \OCA\Deck\NoPermissionException
168 168
 	 * @throws \OCP\AppFramework\Db\DoesNotExistException
169 169
 	 * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
Please login to merge, or discard this patch.
lib/Service/StackService.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,6 @@
 block discarded – undo
30 30
 use OCA\Deck\Db\Stack;
31 31
 use OCA\Deck\Db\StackMapper;
32 32
 use OCA\Deck\StatusException;
33
-use OCP\ICache;
34
-use OCP\ICacheFactory;
35 33
 
36 34
 
37 35
 class StackService {
Please login to merge, or discard this patch.
lib/Db/AttachmentMapper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
 		$entities = [];
82 82
 		$cursor = $qb->execute();
83
-		while($row = $cursor->fetch()){
83
+		while ($row = $cursor->fetch()) {
84 84
 			$entities[] = $this->mapRowToEntity($row);
85 85
 		}
86 86
 		$cursor->closeCursor();
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
 		$entities = [];
107 107
 		$cursor = $qb->execute();
108
-		while($row = $cursor->fetch()){
108
+		while ($row = $cursor->fetch()) {
109 109
 			$entities[] = $this->mapRowToEntity($row);
110 110
 		}
111 111
 		$cursor->closeCursor();
Please login to merge, or discard this patch.
lib/Command/UserExport.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,16 +99,16 @@
 block discarded – undo
99 99
 		$data = [];
100 100
 		foreach ($boards as $board) {
101 101
 			$fullBoard = $this->boardMapper->find($board->getId(), true, true);
102
-			$data[$board->getId()] = (array)$fullBoard->jsonSerialize();
102
+			$data[$board->getId()] = (array) $fullBoard->jsonSerialize();
103 103
 			$stacks = $this->stackMapper->findAll($board->getId());
104 104
 			foreach ($stacks as $stack) {
105
-				$data[$board->getId()]['stacks'][] = (array)$stack->jsonSerialize();
105
+				$data[$board->getId()]['stacks'][] = (array) $stack->jsonSerialize();
106 106
 				$cards = $this->cardMapper->findAllByStack($stack->getId());
107 107
 				foreach ($cards as $card) {
108 108
 					$fullCard = $this->cardMapper->find($card->getId());
109 109
 					$assignedUsers = $this->assignedUsersMapper->find($card->getId());
110 110
 					$fullCard->setAssignedUsers($assignedUsers);
111
-					$data[$board->getId()]['stacks'][$stack->getId()]['cards'][] = (array)$fullCard->jsonSerialize();
111
+					$data[$board->getId()]['stacks'][$stack->getId()]['cards'][] = (array) $fullCard->jsonSerialize();
112 112
 				}
113 113
 			}
114 114
 		}
Please login to merge, or discard this patch.
lib/Service/FileService.php 2 patches
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -23,15 +23,11 @@
 block discarded – undo
23 23
 
24 24
 namespace OCA\Deck\Service;
25 25
 
26
-use OC\Security\CSP\ContentSecurityPolicyManager;
27 26
 use OCA\Deck\Db\Attachment;
28 27
 use OCA\Deck\StatusException;
29 28
 use OCP\AppFramework\Http\ContentSecurityPolicy;
30
-use OCP\AppFramework\Http\EmptyContentSecurityPolicy;
31 29
 use OCP\AppFramework\Http\FileDisplayResponse;
32 30
 use OCP\AppFramework\Http\StreamResponse;
33
-use OCP\Files\Cache\IScanner;
34
-use OCP\Files\Folder;
35 31
 use OCP\Files\IAppData;
36 32
 use OCP\Files\IRootFolder;
37 33
 use OCP\Files\NotFoundException;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	 * @throws NotPermittedException
86 86
 	 */
87 87
 	private function getFolder(Attachment $attachment) {
88
-		$folderName = 'file-card-' . (int)$attachment->getCardId();
88
+		$folderName = 'file-card-' . (int) $attachment->getCardId();
89 89
 		try {
90 90
 			$folder = $this->appData->getFolder($folderName);
91 91
 		} catch (NotFoundException $e) {
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 	 * @return array
117 117
 	 * @throws StatusException
118 118
 	 */
119
-	private function getUploadedFile () {
119
+	private function getUploadedFile() {
120 120
 		$file = $this->request->getUploadedFile('file');
121 121
 		$error = null;
122 122
 		$phpFileUploadErrors = [
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 	 * @throws \Exception
191 191
 	 */
192 192
 	private function getFileFromRootFolder(Attachment $attachment) {
193
-		$folderName = 'file-card-' . (int)$attachment->getCardId();
193
+		$folderName = 'file-card-' . (int) $attachment->getCardId();
194 194
 		$instanceId = $this->config->getSystemValue('instanceid', null);
195 195
 		if ($instanceId === null) {
196 196
 			throw new \Exception('no instance id!');
Please login to merge, or discard this patch.
lib/Controller/PageController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 	public function index() {
60 60
 		$params = [
61 61
 			'user' => $this->userId,
62
-			'maxUploadSize' => (int)\OCP\Util::uploadLimit(),
62
+			'maxUploadSize' => (int) \OCP\Util::uploadLimit(),
63 63
 		];
64 64
 			
65 65
 		if ($this->defaultBoardService->checkFirstRun($this->userId, $this->appName)) {
Please login to merge, or discard this patch.
lib/Service/DefaultBoardService.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
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,9 +54,9 @@  discard block
 block discarded – undo
54 54
 		$this->config = $config;
55 55
 		$this->boardMapper = $boardMapper;
56 56
 		$this->l10n = $l10n;
57
-    }
57
+	}
58 58
     
59
-    public function checkFirstRun($userId, $appName) {        
59
+	public function checkFirstRun($userId, $appName) {        
60 60
 		$firstRun = $this->config->getUserValue($userId, $appName, 'firstRun', 'yes');
61 61
 		$userBoards = $this->boardMapper->findAllByUser($userId);
62 62
 		
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
 		}
67 67
 
68 68
 		return false;
69
-    }
69
+	}
70 70
 
71
-    public function createDefaultBoard($title, $userId, $color) {
72
-        $defaultBoard = $this->boardService->create($title, $userId, $color);
73
-        $defaultStacks = [];
74
-        $defaultCards = [];
71
+	public function createDefaultBoard($title, $userId, $color) {
72
+		$defaultBoard = $this->boardService->create($title, $userId, $color);
73
+		$defaultStacks = [];
74
+		$defaultCards = [];
75 75
 
76 76
 		$boardId = $defaultBoard->getId();		
77 77
 
@@ -84,5 +84,5 @@  discard block
 block discarded – undo
84 84
 		$defaultCards[] = $this->cardService->create($this->l10n->t('Example Task 1'), $defaultStacks[2]->getId(), 'text', 0, $userId);
85 85
 
86 86
 		return $defaultBoard;
87
-    }
87
+	}
88 88
 }
89 89
\ No newline at end of file
Please login to merge, or discard this patch.