Passed
Push — master ( db5915...22087f )
by Julius
02:53
created
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/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/LabelApiController.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@
 block discarded – undo
32 32
 use OCA\Deck\Controller\Helper\ApiHelper;
33 33
 
34 34
  /**
35
- * Class BoardApiController
36
- *
37
- * @package OCA\Deck\Controller
38
- */
35
+  * Class BoardApiController
36
+  *
37
+  * @package OCA\Deck\Controller
38
+  */
39 39
 class LabelApiController extends ApiController {
40 40
 
41 41
 	private $labelService;
Please login to merge, or discard this patch.
lib/Db/AttachmentMapper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,14 +67,14 @@  discard block
 block discarded – undo
67 67
 
68 68
 		$cursor = $qb->execute();
69 69
 		$row = $cursor->fetch(PDO::FETCH_ASSOC);
70
-		if($row === false) {
70
+		if ($row === false) {
71 71
 			$cursor->closeCursor();
72 72
 			throw new DoesNotExistException('Did expect one result but found none when executing' . $qb);
73 73
 		}
74 74
 
75 75
 		$row2 = $cursor->fetch();
76 76
 		$cursor->closeCursor();
77
-		if($row2 !== false ) {
77
+		if ($row2 !== false) {
78 78
 			throw new MultipleObjectsReturnedException('Did not expect more than one result when executing' . $query);
79 79
 		}
80 80
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
 		$entities = [];
99 99
 		$cursor = $qb->execute();
100
-		while($row = $cursor->fetch()){
100
+		while ($row = $cursor->fetch()) {
101 101
 			$entities[] = $this->mapRowToEntity($row);
102 102
 		}
103 103
 		$cursor->closeCursor();
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
 		$entities = [];
129 129
 		$cursor = $qb->execute();
130
-		while($row = $cursor->fetch()){
130
+		while ($row = $cursor->fetch()) {
131 131
 			$entities[] = $this->mapRowToEntity($row);
132 132
 		}
133 133
 		$cursor->closeCursor();
Please login to merge, or discard this patch.
lib/Db/CardMapper.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -136,6 +136,9 @@
 block discarded – undo
136 136
 		return parent::delete($entity);
137 137
 	}
138 138
 
139
+	/**
140
+	 * @param integer $stackId
141
+	 */
139 142
 	public function deleteByStack($stackId) {
140 143
 		$cards = $this->findAllByStack($stackId);
141 144
 		foreach ($cards as $card) {
Please login to merge, or discard this patch.
appinfo/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,6 +112,6 @@
 block discarded – undo
112 112
 		['name' => 'attachment_api#delete', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}/attachments/{attachmentId}', 'verb' => 'DELETE'],
113 113
 		['name' => 'attachment_api#restore', 'url' => '/api/v1.0/boards/{boardId}/stacks/{stackId}/cards/{cardId}/attachments/{attachmentId}/restore', 'verb' => 'PUT'],
114 114
 
115
-		['name' => 'board_api#preflighted_cors', 'url' => '/api/v1.0/{path}','verb' => 'OPTIONS', 'requirements' => ['path' => '.+']],
115
+		['name' => 'board_api#preflighted_cors', 'url' => '/api/v1.0/{path}', 'verb' => 'OPTIONS', 'requirements' => ['path' => '.+']],
116 116
 	]
117 117
 ];
Please login to merge, or discard this patch.
lib/Service/DefaultBoardService.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	private $config;
41 41
 	private $l10n;
42 42
 
43
-    public function __construct(
43
+	public function __construct(
44 44
 			IL10N $l10n,
45 45
 			BoardMapper $boardMapper,
46 46
 			BoardService $boardService,
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 		$this->config = $config;
56 56
 		$this->boardMapper = $boardMapper;
57 57
 		$this->l10n = $l10n;
58
-    }
58
+	}
59 59
 
60 60
 	/**
61 61
 	 * @param $userId
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 		}
74 74
 
75 75
 		return false;
76
-    }
76
+	}
77 77
 
78 78
 	/**
79 79
 	 * @param $title
@@ -100,9 +100,9 @@  discard block
 block discarded – undo
100 100
 			throw new BadRequestException('color must be provided');
101 101
 		}
102 102
 
103
-        $defaultBoard = $this->boardService->create($title, $userId, $color);
104
-        $defaultStacks = [];
105
-        $defaultCards = [];
103
+		$defaultBoard = $this->boardService->create($title, $userId, $color);
104
+		$defaultStacks = [];
105
+		$defaultCards = [];
106 106
 
107 107
 		$boardId = $defaultBoard->getId();		
108 108
 
@@ -115,5 +115,5 @@  discard block
 block discarded – undo
115 115
 		$defaultCards[] = $this->cardService->create($this->l10n->t('Example Task 1'), $defaultStacks[2]->getId(), 'text', 0, $userId);
116 116
 
117 117
 		return $defaultBoard;
118
-    }
118
+	}
119 119
 }
120 120
\ No newline at end of file
Please login to merge, or discard this patch.