@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | $template->setSubject($this->l->t('Password for %1$s changed on %2$s', [$user->getDisplayName(), $instanceUrl])); |
| 127 | 127 | $template->addHeader(); |
| 128 | 128 | $template->addHeading($this->l->t('Password changed for %s', [$user->getDisplayName()]), false); |
| 129 | - $template->addBodyText($text . ' ' . $this->l->t('If you did not request this, please contact an administrator.')); |
|
| 129 | + $template->addBodyText($text.' '.$this->l->t('If you did not request this, please contact an administrator.')); |
|
| 130 | 130 | $template->addFooter(); |
| 131 | 131 | |
| 132 | 132 | |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | $template->setSubject($this->l->t('Email address for %1$s changed on %2$s', [$user->getDisplayName(), $instanceUrl])); |
| 197 | 197 | $template->addHeader(); |
| 198 | 198 | $template->addHeading($this->l->t('Email address changed for %s', [$user->getDisplayName()]), false); |
| 199 | - $template->addBodyText($text . ' ' . $this->l->t('If you did not request this, please contact an administrator.')); |
|
| 199 | + $template->addBodyText($text.' '.$this->l->t('If you did not request this, please contact an administrator.')); |
|
| 200 | 200 | if ($user->getEMailAddress()) { |
| 201 | 201 | $template->addBodyText($this->l->t('The new email address is %s', [$user->getEMailAddress()])); |
| 202 | 202 | } |
@@ -210,10 +210,10 @@ discard block |
||
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | $passwordPolicy = $this->getPasswordPolicy(); |
| 213 | - $passwordCharset = ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_DIGITS; |
|
| 213 | + $passwordCharset = ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_DIGITS; |
|
| 214 | 214 | $passwordLength = 8; |
| 215 | 215 | if (!empty($passwordPolicy)) { |
| 216 | - $passwordLength = (int)$passwordPolicy['minLength'] > 0 ? (int)$passwordPolicy['minLength'] : $passwordLength; |
|
| 216 | + $passwordLength = (int) $passwordPolicy['minLength'] > 0 ? (int) $passwordPolicy['minLength'] : $passwordLength; |
|
| 217 | 217 | $passwordCharset .= $passwordPolicy['enforceSpecialCharacters'] ? ISecureRandom::CHAR_SYMBOLS : ''; |
| 218 | 218 | } |
| 219 | 219 | |
@@ -351,11 +351,11 @@ discard block |
||
| 351 | 351 | $share->getExpirationDate() |
| 352 | 352 | ); |
| 353 | 353 | } catch (HintException $hintException) { |
| 354 | - $this->logger->error('Failed to send share by mail: ' . $hintException->getMessage()); |
|
| 354 | + $this->logger->error('Failed to send share by mail: '.$hintException->getMessage()); |
|
| 355 | 355 | $this->removeShareFromTable($shareId); |
| 356 | 356 | throw $hintException; |
| 357 | 357 | } catch (\Exception $e) { |
| 358 | - $this->logger->error('Failed to send share by email: ' . $e->getMessage()); |
|
| 358 | + $this->logger->error('Failed to send share by email: '.$e->getMessage()); |
|
| 359 | 359 | $this->removeShareFromTable($shareId); |
| 360 | 360 | throw new HintException('Failed to send share by mail', |
| 361 | 361 | $this->l->t('Failed to send share by email')); |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | $text = $this->l->t('%s shared »%s« with you.', [$initiatorDisplayName, $filename]); |
| 397 | 397 | |
| 398 | 398 | $emailTemplate->addBodyText( |
| 399 | - $text . ' ' . $this->l->t('Click the button below to open it.'), |
|
| 399 | + $text.' '.$this->l->t('Click the button below to open it.'), |
|
| 400 | 400 | $text |
| 401 | 401 | ); |
| 402 | 402 | $emailTemplate->addBodyButton( |
@@ -420,9 +420,9 @@ discard block |
||
| 420 | 420 | // The "Reply-To" is set to the sharer if an mail address is configured |
| 421 | 421 | // also the default footer contains a "Do not reply" which needs to be adjusted. |
| 422 | 422 | $initiatorEmail = $initiatorUser->getEMailAddress(); |
| 423 | - if($initiatorEmail !== null) { |
|
| 423 | + if ($initiatorEmail !== null) { |
|
| 424 | 424 | $message->setReplyTo([$initiatorEmail => $initiatorDisplayName]); |
| 425 | - $emailTemplate->addFooter($instanceName . ($this->defaults->getSlogan() !== '' ? ' - ' . $this->defaults->getSlogan() : '')); |
|
| 425 | + $emailTemplate->addFooter($instanceName.($this->defaults->getSlogan() !== '' ? ' - '.$this->defaults->getSlogan() : '')); |
|
| 426 | 426 | } else { |
| 427 | 427 | $emailTemplate->addFooter(); |
| 428 | 428 | } |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
| 484 | 484 | if ($initiatorEmailAddress !== null) { |
| 485 | 485 | $message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]); |
| 486 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
| 486 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
| 487 | 487 | } else { |
| 488 | 488 | $emailTemplate->addFooter(); |
| 489 | 489 | } |
@@ -578,7 +578,7 @@ discard block |
||
| 578 | 578 | ->orderBy('id'); |
| 579 | 579 | |
| 580 | 580 | $cursor = $qb->execute(); |
| 581 | - while($data = $cursor->fetch()) { |
|
| 581 | + while ($data = $cursor->fetch()) { |
|
| 582 | 582 | $children[] = $this->createShareObject($data); |
| 583 | 583 | } |
| 584 | 584 | $cursor->closeCursor(); |
@@ -622,7 +622,7 @@ discard block |
||
| 622 | 622 | $qb->execute(); |
| 623 | 623 | $id = $qb->getLastInsertId(); |
| 624 | 624 | |
| 625 | - return (int)$id; |
|
| 625 | + return (int) $id; |
|
| 626 | 626 | } |
| 627 | 627 | |
| 628 | 628 | /** |
@@ -639,7 +639,7 @@ discard block |
||
| 639 | 639 | // a real password was given |
| 640 | 640 | $validPassword = $plainTextPassword !== null && $plainTextPassword !== ''; |
| 641 | 641 | |
| 642 | - if($validPassword && $originalShare->getPassword() !== $share->getPassword()) { |
|
| 642 | + if ($validPassword && $originalShare->getPassword() !== $share->getPassword()) { |
|
| 643 | 643 | $this->sendPassword($share, $plainTextPassword); |
| 644 | 644 | } |
| 645 | 645 | /* |
@@ -733,7 +733,7 @@ discard block |
||
| 733 | 733 | |
| 734 | 734 | $cursor = $qb->execute(); |
| 735 | 735 | $shares = []; |
| 736 | - while($data = $cursor->fetch()) { |
|
| 736 | + while ($data = $cursor->fetch()) { |
|
| 737 | 737 | $shares[] = $this->createShareObject($data); |
| 738 | 738 | } |
| 739 | 739 | $cursor->closeCursor(); |
@@ -785,7 +785,7 @@ discard block |
||
| 785 | 785 | ->execute(); |
| 786 | 786 | |
| 787 | 787 | $shares = []; |
| 788 | - while($data = $cursor->fetch()) { |
|
| 788 | + while ($data = $cursor->fetch()) { |
|
| 789 | 789 | $shares[] = $this->createShareObject($data); |
| 790 | 790 | } |
| 791 | 791 | $cursor->closeCursor(); |
@@ -824,7 +824,7 @@ discard block |
||
| 824 | 824 | |
| 825 | 825 | $cursor = $qb->execute(); |
| 826 | 826 | |
| 827 | - while($data = $cursor->fetch()) { |
|
| 827 | + while ($data = $cursor->fetch()) { |
|
| 828 | 828 | $shares[] = $this->createShareObject($data); |
| 829 | 829 | } |
| 830 | 830 | $cursor->closeCursor(); |
@@ -887,15 +887,15 @@ discard block |
||
| 887 | 887 | protected function createShareObject($data) { |
| 888 | 888 | |
| 889 | 889 | $share = new Share($this->rootFolder, $this->userManager); |
| 890 | - $share->setId((int)$data['id']) |
|
| 891 | - ->setShareType((int)$data['share_type']) |
|
| 892 | - ->setPermissions((int)$data['permissions']) |
|
| 890 | + $share->setId((int) $data['id']) |
|
| 891 | + ->setShareType((int) $data['share_type']) |
|
| 892 | + ->setPermissions((int) $data['permissions']) |
|
| 893 | 893 | ->setTarget($data['file_target']) |
| 894 | - ->setMailSend((bool)$data['mail_send']) |
|
| 894 | + ->setMailSend((bool) $data['mail_send']) |
|
| 895 | 895 | ->setToken($data['token']); |
| 896 | 896 | |
| 897 | 897 | $shareTime = new \DateTime(); |
| 898 | - $shareTime->setTimestamp((int)$data['stime']); |
|
| 898 | + $shareTime->setTimestamp((int) $data['stime']); |
|
| 899 | 899 | $share->setShareTime($shareTime); |
| 900 | 900 | $share->setSharedWith($data['share_with']); |
| 901 | 901 | $share->setPassword($data['password']); |
@@ -906,7 +906,7 @@ discard block |
||
| 906 | 906 | } else { |
| 907 | 907 | //OLD SHARE |
| 908 | 908 | $share->setSharedBy($data['uid_owner']); |
| 909 | - $path = $this->getNode($share->getSharedBy(), (int)$data['file_source']); |
|
| 909 | + $path = $this->getNode($share->getSharedBy(), (int) $data['file_source']); |
|
| 910 | 910 | |
| 911 | 911 | $owner = $path->getOwner(); |
| 912 | 912 | $share->setShareOwner($owner->getUID()); |
@@ -919,7 +919,7 @@ discard block |
||
| 919 | 919 | } |
| 920 | 920 | } |
| 921 | 921 | |
| 922 | - $share->setNodeId((int)$data['file_source']); |
|
| 922 | + $share->setNodeId((int) $data['file_source']); |
|
| 923 | 923 | $share->setNodeType($data['item_type']); |
| 924 | 924 | |
| 925 | 925 | $share->setProviderId($this->identifier()); |
@@ -1038,7 +1038,7 @@ discard block |
||
| 1038 | 1038 | ); |
| 1039 | 1039 | } |
| 1040 | 1040 | |
| 1041 | - $qb->innerJoin('s', 'filecache' ,'f', $qb->expr()->eq('s.file_source', 'f.fileid')); |
|
| 1041 | + $qb->innerJoin('s', 'filecache', 'f', $qb->expr()->eq('s.file_source', 'f.fileid')); |
|
| 1042 | 1042 | $qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId()))); |
| 1043 | 1043 | |
| 1044 | 1044 | $qb->orderBy('id'); |