@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | $user = $this->userManager->get($recipient); |
| 359 | 359 | |
| 360 | 360 | if (is_null($group)) { |
| 361 | - throw new ProviderException('Group "' . $share->getSharedWith() . '" does not exist'); |
|
| 361 | + throw new ProviderException('Group "'.$share->getSharedWith().'" does not exist'); |
|
| 362 | 362 | } |
| 363 | 363 | |
| 364 | 364 | if (!$group->inGroup($user)) { |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | $user = $this->userManager->get($recipient); |
| 485 | 485 | |
| 486 | 486 | if (is_null($group)) { |
| 487 | - throw new ProviderException('Group "' . $share->getSharedWith() . '" does not exist'); |
|
| 487 | + throw new ProviderException('Group "'.$share->getSharedWith().'" does not exist'); |
|
| 488 | 488 | } |
| 489 | 489 | |
| 490 | 490 | if (!$group->inGroup($user)) { |
@@ -694,10 +694,10 @@ discard block |
||
| 694 | 694 | } |
| 695 | 695 | |
| 696 | 696 | // todo? maybe get these from the oc_mounts table |
| 697 | - $childMountNodes = array_filter($node->getDirectoryListing(), function (Node $node): bool { |
|
| 697 | + $childMountNodes = array_filter($node->getDirectoryListing(), function(Node $node): bool { |
|
| 698 | 698 | return $node->getInternalPath() === ''; |
| 699 | 699 | }); |
| 700 | - $childMountRootIds = array_map(function (Node $node): int { |
|
| 700 | + $childMountRootIds = array_map(function(Node $node): int { |
|
| 701 | 701 | return $node->getId(); |
| 702 | 702 | }, $childMountNodes); |
| 703 | 703 | |
@@ -712,7 +712,7 @@ discard block |
||
| 712 | 712 | } else { |
| 713 | 713 | $qb->andWhere( |
| 714 | 714 | $qb->expr()->orX( |
| 715 | - $qb->expr()->like('f.path', $qb->createNamedParameter($this->dbConn->escapeLikeParameter($node->getInternalPath()) . '/%')), |
|
| 715 | + $qb->expr()->like('f.path', $qb->createNamedParameter($this->dbConn->escapeLikeParameter($node->getInternalPath()).'/%')), |
|
| 716 | 716 | $qb->expr()->in('f.fileid', $qb->createParameter('chunk')) |
| 717 | 717 | ) |
| 718 | 718 | ); |
@@ -1066,17 +1066,17 @@ discard block |
||
| 1066 | 1066 | */ |
| 1067 | 1067 | private function createShare($data) { |
| 1068 | 1068 | $share = new Share($this->rootFolder, $this->userManager); |
| 1069 | - $share->setId((int)$data['id']) |
|
| 1070 | - ->setShareType((int)$data['share_type']) |
|
| 1071 | - ->setPermissions((int)$data['permissions']) |
|
| 1069 | + $share->setId((int) $data['id']) |
|
| 1070 | + ->setShareType((int) $data['share_type']) |
|
| 1071 | + ->setPermissions((int) $data['permissions']) |
|
| 1072 | 1072 | ->setTarget($data['file_target']) |
| 1073 | - ->setNote((string)$data['note']) |
|
| 1074 | - ->setMailSend((bool)$data['mail_send']) |
|
| 1075 | - ->setStatus((int)$data['accepted']) |
|
| 1073 | + ->setNote((string) $data['note']) |
|
| 1074 | + ->setMailSend((bool) $data['mail_send']) |
|
| 1075 | + ->setStatus((int) $data['accepted']) |
|
| 1076 | 1076 | ->setLabel($data['label']); |
| 1077 | 1077 | |
| 1078 | 1078 | $shareTime = new \DateTime(); |
| 1079 | - $shareTime->setTimestamp((int)$data['stime']); |
|
| 1079 | + $shareTime->setTimestamp((int) $data['stime']); |
|
| 1080 | 1080 | $share->setShareTime($shareTime); |
| 1081 | 1081 | |
| 1082 | 1082 | if ($share->getShareType() === IShare::TYPE_USER) { |
@@ -1093,7 +1093,7 @@ discard block |
||
| 1093 | 1093 | } |
| 1094 | 1094 | } elseif ($share->getShareType() === IShare::TYPE_LINK) { |
| 1095 | 1095 | $share->setPassword($data['password']); |
| 1096 | - $share->setSendPasswordByTalk((bool)$data['password_by_talk']); |
|
| 1096 | + $share->setSendPasswordByTalk((bool) $data['password_by_talk']); |
|
| 1097 | 1097 | $share->setToken($data['token']); |
| 1098 | 1098 | } |
| 1099 | 1099 | |
@@ -1102,7 +1102,7 @@ discard block |
||
| 1102 | 1102 | $share->setSharedBy($data['uid_initiator']); |
| 1103 | 1103 | $share->setShareOwner($data['uid_owner']); |
| 1104 | 1104 | |
| 1105 | - $share->setNodeId((int)$data['file_source']); |
|
| 1105 | + $share->setNodeId((int) $data['file_source']); |
|
| 1106 | 1106 | $share->setNodeType($data['item_type']); |
| 1107 | 1107 | |
| 1108 | 1108 | if ($data['expiration'] !== null) { |
@@ -1119,7 +1119,7 @@ discard block |
||
| 1119 | 1119 | } |
| 1120 | 1120 | |
| 1121 | 1121 | $share->setProviderId($this->identifier()); |
| 1122 | - $share->setHideDownload((int)$data['hide_download'] === 1); |
|
| 1122 | + $share->setHideDownload((int) $data['hide_download'] === 1); |
|
| 1123 | 1123 | |
| 1124 | 1124 | return $share; |
| 1125 | 1125 | } |
@@ -1148,7 +1148,7 @@ discard block |
||
| 1148 | 1148 | $shareMap = []; |
| 1149 | 1149 | |
| 1150 | 1150 | foreach ($shareSlice as $share) { |
| 1151 | - $ids[] = (int)$share->getId(); |
|
| 1151 | + $ids[] = (int) $share->getId(); |
|
| 1152 | 1152 | $shareMap[$share->getId()] = $share; |
| 1153 | 1153 | } |
| 1154 | 1154 | |
@@ -1166,8 +1166,8 @@ discard block |
||
| 1166 | 1166 | $stmt = $query->execute(); |
| 1167 | 1167 | |
| 1168 | 1168 | while ($data = $stmt->fetch()) { |
| 1169 | - $shareMap[$data['parent']]->setPermissions((int)$data['permissions']); |
|
| 1170 | - $shareMap[$data['parent']]->setStatus((int)$data['accepted']); |
|
| 1169 | + $shareMap[$data['parent']]->setPermissions((int) $data['permissions']); |
|
| 1170 | + $shareMap[$data['parent']]->setStatus((int) $data['accepted']); |
|
| 1171 | 1171 | $shareMap[$data['parent']]->setTarget($data['file_target']); |
| 1172 | 1172 | $shareMap[$data['parent']]->setParent($data['parent']); |
| 1173 | 1173 | } |
@@ -1243,7 +1243,7 @@ discard block |
||
| 1243 | 1243 | ) |
| 1244 | 1244 | ); |
| 1245 | 1245 | } else { |
| 1246 | - \OC::$server->getLogger()->logException(new \InvalidArgumentException('Default share provider tried to delete all shares for type: ' . $shareType)); |
|
| 1246 | + \OC::$server->getLogger()->logException(new \InvalidArgumentException('Default share provider tried to delete all shares for type: '.$shareType)); |
|
| 1247 | 1247 | return; |
| 1248 | 1248 | } |
| 1249 | 1249 | |
@@ -1269,7 +1269,7 @@ discard block |
||
| 1269 | 1269 | $cursor = $qb->execute(); |
| 1270 | 1270 | $ids = []; |
| 1271 | 1271 | while ($row = $cursor->fetch()) { |
| 1272 | - $ids[] = (int)$row['id']; |
|
| 1272 | + $ids[] = (int) $row['id']; |
|
| 1273 | 1273 | } |
| 1274 | 1274 | $cursor->closeCursor(); |
| 1275 | 1275 | |
@@ -1312,7 +1312,7 @@ discard block |
||
| 1312 | 1312 | $cursor = $qb->execute(); |
| 1313 | 1313 | $ids = []; |
| 1314 | 1314 | while ($row = $cursor->fetch()) { |
| 1315 | - $ids[] = (int)$row['id']; |
|
| 1315 | + $ids[] = (int) $row['id']; |
|
| 1316 | 1316 | } |
| 1317 | 1317 | $cursor->closeCursor(); |
| 1318 | 1318 | |
@@ -1367,7 +1367,7 @@ discard block |
||
| 1367 | 1367 | $users = []; |
| 1368 | 1368 | $link = false; |
| 1369 | 1369 | while ($row = $cursor->fetch()) { |
| 1370 | - $type = (int)$row['share_type']; |
|
| 1370 | + $type = (int) $row['share_type']; |
|
| 1371 | 1371 | if ($type === IShare::TYPE_USER) { |
| 1372 | 1372 | $uid = $row['share_with']; |
| 1373 | 1373 | $users[$uid] = isset($users[$uid]) ? $users[$uid] : []; |
@@ -1525,7 +1525,7 @@ discard block |
||
| 1525 | 1525 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
| 1526 | 1526 | if ($initiatorEmailAddress !== null) { |
| 1527 | 1527 | $message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]); |
| 1528 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
| 1528 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
| 1529 | 1529 | } else { |
| 1530 | 1530 | $emailTemplate->addFooter(); |
| 1531 | 1531 | } |