Passed
Push — master ( 1d588f...131b1f )
by Morris
22:21 queued 09:45
created
lib/private/Share20/DefaultShareProvider.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 			$user = $this->userManager->get($recipient);
346 346
 
347 347
 			if (is_null($group)) {
348
-				throw new ProviderException('Group "' . $share->getSharedWith() . '" does not exist');
348
+				throw new ProviderException('Group "'.$share->getSharedWith().'" does not exist');
349 349
 			}
350 350
 
351 351
 			if (!$group->inGroup($user)) {
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
 			$user = $this->userManager->get($recipient);
472 472
 
473 473
 			if (is_null($group)) {
474
-				throw new ProviderException('Group "' . $share->getSharedWith() . '" does not exist');
474
+				throw new ProviderException('Group "'.$share->getSharedWith().'" does not exist');
475 475
 			}
476 476
 
477 477
 			if (!$group->inGroup($user)) {
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
 			);
672 672
 		}
673 673
 
674
-		$qb->innerJoin('s', 'filecache' ,'f', $qb->expr()->eq('s.file_source', 'f.fileid'));
674
+		$qb->innerJoin('s', 'filecache', 'f', $qb->expr()->eq('s.file_source', 'f.fileid'));
675 675
 		$qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId())));
676 676
 
677 677
 		$qb->orderBy('id');
@@ -1006,17 +1006,17 @@  discard block
 block discarded – undo
1006 1006
 	 */
1007 1007
 	private function createShare($data) {
1008 1008
 		$share = new Share($this->rootFolder, $this->userManager);
1009
-		$share->setId((int)$data['id'])
1010
-			->setShareType((int)$data['share_type'])
1011
-			->setPermissions((int)$data['permissions'])
1009
+		$share->setId((int) $data['id'])
1010
+			->setShareType((int) $data['share_type'])
1011
+			->setPermissions((int) $data['permissions'])
1012 1012
 			->setTarget($data['file_target'])
1013 1013
 			->setNote($data['note'])
1014
-			->setMailSend((bool)$data['mail_send'])
1015
-			->setStatus((int)$data['accepted'])
1014
+			->setMailSend((bool) $data['mail_send'])
1015
+			->setStatus((int) $data['accepted'])
1016 1016
 			->setLabel($data['label']);
1017 1017
 
1018 1018
 		$shareTime = new \DateTime();
1019
-		$shareTime->setTimestamp((int)$data['stime']);
1019
+		$shareTime->setTimestamp((int) $data['stime']);
1020 1020
 		$share->setShareTime($shareTime);
1021 1021
 
1022 1022
 		if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER) {
@@ -1029,14 +1029,14 @@  discard block
 block discarded – undo
1029 1029
 			$share->setSharedWith($data['share_with']);
1030 1030
 		} elseif ($share->getShareType() === \OCP\Share::SHARE_TYPE_LINK) {
1031 1031
 			$share->setPassword($data['password']);
1032
-			$share->setSendPasswordByTalk((bool)$data['password_by_talk']);
1032
+			$share->setSendPasswordByTalk((bool) $data['password_by_talk']);
1033 1033
 			$share->setToken($data['token']);
1034 1034
 		}
1035 1035
 
1036 1036
 		$share->setSharedBy($data['uid_initiator']);
1037 1037
 		$share->setShareOwner($data['uid_owner']);
1038 1038
 
1039
-		$share->setNodeId((int)$data['file_source']);
1039
+		$share->setNodeId((int) $data['file_source']);
1040 1040
 		$share->setNodeType($data['item_type']);
1041 1041
 
1042 1042
 		if ($data['expiration'] !== null) {
@@ -1053,7 +1053,7 @@  discard block
 block discarded – undo
1053 1053
 		}
1054 1054
 
1055 1055
 		$share->setProviderId($this->identifier());
1056
-		$share->setHideDownload((int)$data['hide_download'] === 1);
1056
+		$share->setHideDownload((int) $data['hide_download'] === 1);
1057 1057
 
1058 1058
 		return $share;
1059 1059
 	}
@@ -1082,7 +1082,7 @@  discard block
 block discarded – undo
1082 1082
 			$shareMap = [];
1083 1083
 
1084 1084
 			foreach ($shareSlice as $share) {
1085
-				$ids[] = (int)$share->getId();
1085
+				$ids[] = (int) $share->getId();
1086 1086
 				$shareMap[$share->getId()] = $share;
1087 1087
 			}
1088 1088
 
@@ -1100,8 +1100,8 @@  discard block
 block discarded – undo
1100 1100
 			$stmt = $query->execute();
1101 1101
 
1102 1102
 			while ($data = $stmt->fetch()) {
1103
-				$shareMap[$data['parent']]->setPermissions((int)$data['permissions']);
1104
-				$shareMap[$data['parent']]->setStatus((int)$data['accepted']);
1103
+				$shareMap[$data['parent']]->setPermissions((int) $data['permissions']);
1104
+				$shareMap[$data['parent']]->setStatus((int) $data['accepted']);
1105 1105
 				$shareMap[$data['parent']]->setTarget($data['file_target']);
1106 1106
 				$shareMap[$data['parent']]->setParent($data['parent']);
1107 1107
 			}
@@ -1177,7 +1177,7 @@  discard block
 block discarded – undo
1177 1177
 				)
1178 1178
 			);
1179 1179
 		} else {
1180
-			\OC::$server->getLogger()->logException(new \InvalidArgumentException('Default share provider tried to delete all shares for type: ' . $shareType));
1180
+			\OC::$server->getLogger()->logException(new \InvalidArgumentException('Default share provider tried to delete all shares for type: '.$shareType));
1181 1181
 			return;
1182 1182
 		}
1183 1183
 
@@ -1203,7 +1203,7 @@  discard block
 block discarded – undo
1203 1203
 		$cursor = $qb->execute();
1204 1204
 		$ids = [];
1205 1205
 		while ($row = $cursor->fetch()) {
1206
-			$ids[] = (int)$row['id'];
1206
+			$ids[] = (int) $row['id'];
1207 1207
 		}
1208 1208
 		$cursor->closeCursor();
1209 1209
 
@@ -1246,7 +1246,7 @@  discard block
 block discarded – undo
1246 1246
 		$cursor = $qb->execute();
1247 1247
 		$ids = [];
1248 1248
 		while ($row = $cursor->fetch()) {
1249
-			$ids[] = (int)$row['id'];
1249
+			$ids[] = (int) $row['id'];
1250 1250
 		}
1251 1251
 		$cursor->closeCursor();
1252 1252
 
@@ -1301,7 +1301,7 @@  discard block
 block discarded – undo
1301 1301
 		$users = [];
1302 1302
 		$link = false;
1303 1303
 		while ($row = $cursor->fetch()) {
1304
-			$type = (int)$row['share_type'];
1304
+			$type = (int) $row['share_type'];
1305 1305
 			if ($type === \OCP\Share::SHARE_TYPE_USER) {
1306 1306
 				$uid = $row['share_with'];
1307 1307
 				$users[$uid] = isset($users[$uid]) ? $users[$uid] : [];
@@ -1449,7 +1449,7 @@  discard block
 block discarded – undo
1449 1449
 			$message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]);
1450 1450
 			if ($initiatorEmailAddress !== null) {
1451 1451
 				$message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]);
1452
-				$emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan());
1452
+				$emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan());
1453 1453
 			} else {
1454 1454
 				$emailTemplate->addFooter();
1455 1455
 			}
Please login to merge, or discard this patch.