@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | ->orderBy('id'); |
| 346 | 346 | |
| 347 | 347 | $cursor = $qb->execute(); |
| 348 | - while($data = $cursor->fetch()) { |
|
| 348 | + while ($data = $cursor->fetch()) { |
|
| 349 | 349 | $children[] = $this->createShare($data); |
| 350 | 350 | } |
| 351 | 351 | $cursor->closeCursor(); |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | $user = $this->userManager->get($recipient); |
| 391 | 391 | |
| 392 | 392 | if (is_null($group)) { |
| 393 | - throw new ProviderException('Group "' . $share->getSharedWith() . '" does not exist'); |
|
| 393 | + throw new ProviderException('Group "'.$share->getSharedWith().'" does not exist'); |
|
| 394 | 394 | } |
| 395 | 395 | |
| 396 | 396 | if (!$group->inGroup($user)) { |
@@ -585,7 +585,7 @@ discard block |
||
| 585 | 585 | ); |
| 586 | 586 | } |
| 587 | 587 | |
| 588 | - $qb->innerJoin('s', 'filecache' ,'f', $qb->expr()->eq('s.file_source', 'f.fileid')); |
|
| 588 | + $qb->innerJoin('s', 'filecache', 'f', $qb->expr()->eq('s.file_source', 'f.fileid')); |
|
| 589 | 589 | $qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId()))); |
| 590 | 590 | |
| 591 | 591 | $qb->orderBy('id'); |
@@ -641,7 +641,7 @@ discard block |
||
| 641 | 641 | |
| 642 | 642 | $cursor = $qb->execute(); |
| 643 | 643 | $shares = []; |
| 644 | - while($data = $cursor->fetch()) { |
|
| 644 | + while ($data = $cursor->fetch()) { |
|
| 645 | 645 | $shares[] = $this->createShare($data); |
| 646 | 646 | } |
| 647 | 647 | $cursor->closeCursor(); |
@@ -720,7 +720,7 @@ discard block |
||
| 720 | 720 | ->execute(); |
| 721 | 721 | |
| 722 | 722 | $shares = []; |
| 723 | - while($data = $cursor->fetch()) { |
|
| 723 | + while ($data = $cursor->fetch()) { |
|
| 724 | 724 | $shares[] = $this->createShare($data); |
| 725 | 725 | } |
| 726 | 726 | $cursor->closeCursor(); |
@@ -791,7 +791,7 @@ discard block |
||
| 791 | 791 | |
| 792 | 792 | $cursor = $qb->execute(); |
| 793 | 793 | |
| 794 | - while($data = $cursor->fetch()) { |
|
| 794 | + while ($data = $cursor->fetch()) { |
|
| 795 | 795 | if ($this->isAccessibleResult($data)) { |
| 796 | 796 | $shares[] = $this->createShare($data); |
| 797 | 797 | } |
@@ -806,7 +806,7 @@ discard block |
||
| 806 | 806 | $shares2 = []; |
| 807 | 807 | |
| 808 | 808 | $start = 0; |
| 809 | - while(true) { |
|
| 809 | + while (true) { |
|
| 810 | 810 | $groups = array_slice($allGroups, $start, 100); |
| 811 | 811 | $start += 100; |
| 812 | 812 | |
@@ -851,7 +851,7 @@ discard block |
||
| 851 | 851 | )); |
| 852 | 852 | |
| 853 | 853 | $cursor = $qb->execute(); |
| 854 | - while($data = $cursor->fetch()) { |
|
| 854 | + while ($data = $cursor->fetch()) { |
|
| 855 | 855 | if ($offset > 0) { |
| 856 | 856 | $offset--; |
| 857 | 857 | continue; |
@@ -920,16 +920,16 @@ discard block |
||
| 920 | 920 | */ |
| 921 | 921 | private function createShare($data) { |
| 922 | 922 | $share = new Share($this->rootFolder, $this->userManager); |
| 923 | - $share->setId((int)$data['id']) |
|
| 924 | - ->setShareType((int)$data['share_type']) |
|
| 925 | - ->setPermissions((int)$data['permissions']) |
|
| 923 | + $share->setId((int) $data['id']) |
|
| 924 | + ->setShareType((int) $data['share_type']) |
|
| 925 | + ->setPermissions((int) $data['permissions']) |
|
| 926 | 926 | ->setTarget($data['file_target']) |
| 927 | 927 | ->setNote($data['note']) |
| 928 | - ->setMailSend((bool)$data['mail_send']) |
|
| 928 | + ->setMailSend((bool) $data['mail_send']) |
|
| 929 | 929 | ->setLabel($data['label']); |
| 930 | 930 | |
| 931 | 931 | $shareTime = new \DateTime(); |
| 932 | - $shareTime->setTimestamp((int)$data['stime']); |
|
| 932 | + $shareTime->setTimestamp((int) $data['stime']); |
|
| 933 | 933 | $share->setShareTime($shareTime); |
| 934 | 934 | |
| 935 | 935 | if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER) { |
@@ -944,7 +944,7 @@ discard block |
||
| 944 | 944 | $share->setSharedBy($data['uid_initiator']); |
| 945 | 945 | $share->setShareOwner($data['uid_owner']); |
| 946 | 946 | |
| 947 | - $share->setNodeId((int)$data['file_source']); |
|
| 947 | + $share->setNodeId((int) $data['file_source']); |
|
| 948 | 948 | $share->setNodeType($data['item_type']); |
| 949 | 949 | |
| 950 | 950 | if ($data['expiration'] !== null) { |
@@ -961,7 +961,7 @@ discard block |
||
| 961 | 961 | } |
| 962 | 962 | |
| 963 | 963 | $share->setProviderId($this->identifier()); |
| 964 | - $share->setHideDownload((int)$data['hide_download'] === 1); |
|
| 964 | + $share->setHideDownload((int) $data['hide_download'] === 1); |
|
| 965 | 965 | |
| 966 | 966 | return $share; |
| 967 | 967 | } |
@@ -975,7 +975,7 @@ discard block |
||
| 975 | 975 | $result = []; |
| 976 | 976 | |
| 977 | 977 | $start = 0; |
| 978 | - while(true) { |
|
| 978 | + while (true) { |
|
| 979 | 979 | /** @var Share[] $shareSlice */ |
| 980 | 980 | $shareSlice = array_slice($shares, $start, 100); |
| 981 | 981 | $start += 100; |
@@ -990,7 +990,7 @@ discard block |
||
| 990 | 990 | $shareMap = []; |
| 991 | 991 | |
| 992 | 992 | foreach ($shareSlice as $share) { |
| 993 | - $ids[] = (int)$share->getId(); |
|
| 993 | + $ids[] = (int) $share->getId(); |
|
| 994 | 994 | $shareMap[$share->getId()] = $share; |
| 995 | 995 | } |
| 996 | 996 | |
@@ -1007,8 +1007,8 @@ discard block |
||
| 1007 | 1007 | |
| 1008 | 1008 | $stmt = $query->execute(); |
| 1009 | 1009 | |
| 1010 | - while($data = $stmt->fetch()) { |
|
| 1011 | - $shareMap[$data['parent']]->setPermissions((int)$data['permissions']); |
|
| 1010 | + while ($data = $stmt->fetch()) { |
|
| 1011 | + $shareMap[$data['parent']]->setPermissions((int) $data['permissions']); |
|
| 1012 | 1012 | $shareMap[$data['parent']]->setTarget($data['file_target']); |
| 1013 | 1013 | $shareMap[$data['parent']]->setParent($data['parent']); |
| 1014 | 1014 | } |
@@ -1106,8 +1106,8 @@ discard block |
||
| 1106 | 1106 | |
| 1107 | 1107 | $cursor = $qb->execute(); |
| 1108 | 1108 | $ids = []; |
| 1109 | - while($row = $cursor->fetch()) { |
|
| 1110 | - $ids[] = (int)$row['id']; |
|
| 1109 | + while ($row = $cursor->fetch()) { |
|
| 1110 | + $ids[] = (int) $row['id']; |
|
| 1111 | 1111 | } |
| 1112 | 1112 | $cursor->closeCursor(); |
| 1113 | 1113 | |
@@ -1149,8 +1149,8 @@ discard block |
||
| 1149 | 1149 | |
| 1150 | 1150 | $cursor = $qb->execute(); |
| 1151 | 1151 | $ids = []; |
| 1152 | - while($row = $cursor->fetch()) { |
|
| 1153 | - $ids[] = (int)$row['id']; |
|
| 1152 | + while ($row = $cursor->fetch()) { |
|
| 1153 | + $ids[] = (int) $row['id']; |
|
| 1154 | 1154 | } |
| 1155 | 1155 | $cursor->closeCursor(); |
| 1156 | 1156 | |
@@ -1204,8 +1204,8 @@ discard block |
||
| 1204 | 1204 | |
| 1205 | 1205 | $users = []; |
| 1206 | 1206 | $link = false; |
| 1207 | - while($row = $cursor->fetch()) { |
|
| 1208 | - $type = (int)$row['share_type']; |
|
| 1207 | + while ($row = $cursor->fetch()) { |
|
| 1208 | + $type = (int) $row['share_type']; |
|
| 1209 | 1209 | if ($type === \OCP\Share::SHARE_TYPE_USER) { |
| 1210 | 1210 | $uid = $row['share_with']; |
| 1211 | 1211 | $users[$uid] = isset($users[$uid]) ? $users[$uid] : []; |
@@ -1355,7 +1355,7 @@ discard block |
||
| 1355 | 1355 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
| 1356 | 1356 | if ($initiatorEmailAddress !== null) { |
| 1357 | 1357 | $message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]); |
| 1358 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
| 1358 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
| 1359 | 1359 | } else { |
| 1360 | 1360 | $emailTemplate->addFooter(); |
| 1361 | 1361 | } |