@@ -261,9 +261,9 @@ discard block |
||
| 261 | 261 | */ |
| 262 | 262 | public static function linkToRemote($service) { |
| 263 | 263 | $urlGenerator = \OCP\Server::get(IURLGenerator::class); |
| 264 | - $remoteBase = $urlGenerator->linkTo('', 'remote.php') . '/' . $service; |
|
| 264 | + $remoteBase = $urlGenerator->linkTo('', 'remote.php').'/'.$service; |
|
| 265 | 265 | return $urlGenerator->getAbsoluteURL( |
| 266 | - $remoteBase . (($service[strlen($service) - 1] != '/') ? '/' : '') |
|
| 266 | + $remoteBase.(($service[strlen($service) - 1] != '/') ? '/' : '') |
|
| 267 | 267 | ); |
| 268 | 268 | } |
| 269 | 269 | |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | $user_part = $config->getSystemValueString('mail_from_address', $user_part); |
| 304 | 304 | $host_name = self::getServerHostName(); |
| 305 | 305 | $host_name = $config->getSystemValueString('mail_domain', $host_name); |
| 306 | - $defaultEmailAddress = $user_part . '@' . $host_name; |
|
| 306 | + $defaultEmailAddress = $user_part.'@'.$host_name; |
|
| 307 | 307 | |
| 308 | 308 | $emailValidator = \OCP\Server::get(IEmailValidator::class); |
| 309 | 309 | if ($emailValidator->isValid($defaultEmailAddress)) { |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | } |
| 312 | 312 | |
| 313 | 313 | // in case we cannot build a valid email address from the hostname let's fallback to 'localhost.localdomain' |
| 314 | - return $user_part . '@localhost.localdomain'; |
|
| 314 | + return $user_part.'@localhost.localdomain'; |
|
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | /** |
@@ -320,9 +320,9 @@ discard block |
||
| 320 | 320 | * @return int|float int if it fits, float if it is too big |
| 321 | 321 | * @since 26.0.0 |
| 322 | 322 | */ |
| 323 | - public static function numericToNumber(string|float|int $number): int|float { |
|
| 323 | + public static function numericToNumber(string | float | int $number): int | float { |
|
| 324 | 324 | /* This is a hack to cast to (int|float) */ |
| 325 | - return 0 + (string)$number; |
|
| 325 | + return 0 + (string) $number; |
|
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | /** |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | * @return string a human readable file size |
| 332 | 332 | * @since 4.0.0 |
| 333 | 333 | */ |
| 334 | - public static function humanFileSize(int|float $bytes): string { |
|
| 334 | + public static function humanFileSize(int | float $bytes): string { |
|
| 335 | 335 | if ($bytes < 0) { |
| 336 | 336 | return '?'; |
| 337 | 337 | } |
@@ -367,7 +367,7 @@ discard block |
||
| 367 | 367 | * @return false|int|float a file size in bytes |
| 368 | 368 | * @since 4.0.0 |
| 369 | 369 | */ |
| 370 | - public static function computerFileSize(string $str): false|int|float { |
|
| 370 | + public static function computerFileSize(string $str): false | int | float { |
|
| 371 | 371 | $str = strtolower($str); |
| 372 | 372 | if (is_numeric($str)) { |
| 373 | 373 | return Util::numericToNumber($str); |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | 'p' => 1024 * 1024 * 1024 * 1024 * 1024, |
| 388 | 388 | ]; |
| 389 | 389 | |
| 390 | - $bytes = (float)$str; |
|
| 390 | + $bytes = (float) $str; |
|
| 391 | 391 | |
| 392 | 392 | if (preg_match('#([kmgtp]?b?)$#si', $str, $matches) && isset($bytes_array[$matches[1]])) { |
| 393 | 393 | $bytes *= $bytes_array[$matches[1]]; |
@@ -532,7 +532,7 @@ discard block |
||
| 532 | 532 | * @return int|float number of bytes representing |
| 533 | 533 | * @since 5.0.0 |
| 534 | 534 | */ |
| 535 | - public static function maxUploadFilesize(string $dir, int|float|null $free = null): int|float { |
|
| 535 | + public static function maxUploadFilesize(string $dir, int | float | null $free = null): int | float { |
|
| 536 | 536 | if (is_null($free) || $free < 0) { |
| 537 | 537 | $free = self::freeSpace($dir); |
| 538 | 538 | } |
@@ -545,13 +545,13 @@ discard block |
||
| 545 | 545 | * @return int|float number of bytes representing |
| 546 | 546 | * @since 7.0.0 |
| 547 | 547 | */ |
| 548 | - public static function freeSpace(string $dir): int|float { |
|
| 548 | + public static function freeSpace(string $dir): int | float { |
|
| 549 | 549 | $freeSpace = \OC\Files\Filesystem::free_space($dir); |
| 550 | 550 | if ($freeSpace < \OCP\Files\FileInfo::SPACE_UNLIMITED) { |
| 551 | 551 | $freeSpace = max($freeSpace, 0); |
| 552 | 552 | return $freeSpace; |
| 553 | 553 | } else { |
| 554 | - return (INF > 0)? INF: PHP_INT_MAX; // work around https://bugs.php.net/bug.php?id=69188 |
|
| 554 | + return (INF > 0) ? INF: PHP_INT_MAX; // work around https://bugs.php.net/bug.php?id=69188 |
|
| 555 | 555 | } |
| 556 | 556 | } |
| 557 | 557 | |
@@ -561,7 +561,7 @@ discard block |
||
| 561 | 561 | * @return int|float number of bytes representing |
| 562 | 562 | * @since 7.0.0 |
| 563 | 563 | */ |
| 564 | - public static function uploadLimit(): int|float { |
|
| 564 | + public static function uploadLimit(): int | float { |
|
| 565 | 565 | $ini = Server::get(IniGetWrapper::class); |
| 566 | 566 | $upload_max_filesize = self::computerFileSize($ini->get('upload_max_filesize')) ?: 0; |
| 567 | 567 | $post_max_size = self::computerFileSize($ini->get('post_max_size')) ?: 0; |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | [$userFolder->getRelativePath($share->getNode()->getPath()), $share->getSharedWith()], |
| 159 | 159 | $share->getSharedBy(), |
| 160 | 160 | $share->getNode()->getId(), |
| 161 | - (string)$userFolder->getRelativePath($share->getNode()->getPath()) |
|
| 161 | + (string) $userFolder->getRelativePath($share->getNode()->getPath()) |
|
| 162 | 162 | ); |
| 163 | 163 | |
| 164 | 164 | if ($share->getShareOwner() !== $share->getSharedBy()) { |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | [$ownerFolder->getRelativePath($ownerPath), $share->getSharedWith(), $share->getSharedBy()], |
| 172 | 172 | $share->getShareOwner(), |
| 173 | 173 | $fileId, |
| 174 | - (string)$ownerFolder->getRelativePath($ownerPath) |
|
| 174 | + (string) $ownerFolder->getRelativePath($ownerPath) |
|
| 175 | 175 | ); |
| 176 | 176 | } |
| 177 | 177 | } |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | [$userFolder->getRelativePath($share->getNode()->getPath())], |
| 189 | 189 | $share->getSharedBy(), |
| 190 | 190 | $share->getNode()->getId(), |
| 191 | - (string)$userFolder->getRelativePath($share->getNode()->getPath()) |
|
| 191 | + (string) $userFolder->getRelativePath($share->getNode()->getPath()) |
|
| 192 | 192 | ); |
| 193 | 193 | } else { |
| 194 | 194 | $this->publishActivity( |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | [$userFolder->getRelativePath($share->getNode()->getPath()), $sharedWith], |
| 197 | 197 | $share->getSharedBy(), |
| 198 | 198 | $share->getNode()->getId(), |
| 199 | - (string)$userFolder->getRelativePath($share->getNode()->getPath()) |
|
| 199 | + (string) $userFolder->getRelativePath($share->getNode()->getPath()) |
|
| 200 | 200 | ); |
| 201 | 201 | } |
| 202 | 202 | } |
@@ -247,15 +247,15 @@ discard block |
||
| 247 | 247 | $shareId = $share->getId(); |
| 248 | 248 | |
| 249 | 249 | $emails = $this->getSharedWithEmails($share); |
| 250 | - $validEmails = array_filter($emails, function (string $email) { |
|
| 250 | + $validEmails = array_filter($emails, function(string $email) { |
|
| 251 | 251 | return $this->emailValidator->isValid($email); |
| 252 | 252 | }); |
| 253 | 253 | |
| 254 | 254 | if (count($validEmails) === 0) { |
| 255 | - $this->removeShareFromTable((int)$shareId); |
|
| 256 | - $e = new HintException('Failed to send share by mail. Could not find a valid email address: ' . join(', ', $emails), |
|
| 255 | + $this->removeShareFromTable((int) $shareId); |
|
| 256 | + $e = new HintException('Failed to send share by mail. Could not find a valid email address: '.join(', ', $emails), |
|
| 257 | 257 | $this->l->t('Failed to send share by email. Got an invalid email address')); |
| 258 | - $this->logger->error('Failed to send share by mail. Could not find a valid email address ' . join(', ', $emails), [ |
|
| 258 | + $this->logger->error('Failed to send share by mail. Could not find a valid email address '.join(', ', $emails), [ |
|
| 259 | 259 | 'app' => 'sharebymail', |
| 260 | 260 | 'exception' => $e, |
| 261 | 261 | ]); |
@@ -287,14 +287,14 @@ discard block |
||
| 287 | 287 | 'app' => 'sharebymail', |
| 288 | 288 | 'exception' => $hintException, |
| 289 | 289 | ]); |
| 290 | - $this->removeShareFromTable((int)$shareId); |
|
| 290 | + $this->removeShareFromTable((int) $shareId); |
|
| 291 | 291 | throw $hintException; |
| 292 | 292 | } catch (\Exception $e) { |
| 293 | 293 | $this->logger->error('Failed to send share by mail.', [ |
| 294 | 294 | 'app' => 'sharebymail', |
| 295 | 295 | 'exception' => $e, |
| 296 | 296 | ]); |
| 297 | - $this->removeShareFromTable((int)$shareId); |
|
| 297 | + $this->removeShareFromTable((int) $shareId); |
|
| 298 | 298 | throw new HintException( |
| 299 | 299 | 'Failed to send share by mail', |
| 300 | 300 | $this->l->t('Failed to send share by email'), |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | } |
| 348 | 348 | |
| 349 | 349 | if ($expiration !== null) { |
| 350 | - $dateString = (string)$this->l->l('date', $expiration, ['width' => 'medium']); |
|
| 350 | + $dateString = (string) $this->l->l('date', $expiration, ['width' => 'medium']); |
|
| 351 | 351 | $emailTemplate->addBodyListItem( |
| 352 | 352 | $this->l->t('This share is valid until %s at midnight', [$dateString]), |
| 353 | 353 | $this->l->t('Expiration:'), |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | $initiatorEmail = $initiatorUser->getEMailAddress(); |
| 389 | 389 | if ($initiatorEmail !== null) { |
| 390 | 390 | $message->setReplyTo([$initiatorEmail => $initiatorDisplayName]); |
| 391 | - $emailTemplate->addFooter($instanceName . ($this->defaults->getSlogan() !== '' ? ' - ' . $this->defaults->getSlogan() : '')); |
|
| 391 | + $emailTemplate->addFooter($instanceName.($this->defaults->getSlogan() !== '' ? ' - '.$this->defaults->getSlogan() : '')); |
|
| 392 | 392 | } else { |
| 393 | 393 | $emailTemplate->addFooter(); |
| 394 | 394 | } |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | $message->useTemplate($emailTemplate); |
| 400 | 400 | $failedRecipients = $this->mailer->send($message); |
| 401 | 401 | if (!empty($failedRecipients)) { |
| 402 | - $this->logger->error('Share notification mail could not be sent to: ' . implode(', ', $failedRecipients)); |
|
| 402 | + $this->logger->error('Share notification mail could not be sent to: '.implode(', ', $failedRecipients)); |
|
| 403 | 403 | return; |
| 404 | 404 | } |
| 405 | 405 | } |
@@ -452,7 +452,7 @@ discard block |
||
| 452 | 452 | if ($this->config->getSystemValue('sharing.enable_mail_link_password_expiration', false) === true) { |
| 453 | 453 | $expirationTime = new \DateTime(); |
| 454 | 454 | $expirationInterval = $this->config->getSystemValue('sharing.mail_link_password_expiration_interval', 3600); |
| 455 | - $expirationTime = $expirationTime->add(new \DateInterval('PT' . $expirationInterval . 'S')); |
|
| 455 | + $expirationTime = $expirationTime->add(new \DateInterval('PT'.$expirationInterval.'S')); |
|
| 456 | 456 | $emailTemplate->addBodyText($this->l->t('This password will expire at %s', [$expirationTime->format('r')])); |
| 457 | 457 | } |
| 458 | 458 | |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | $initiatorEmail = $initiatorUser->getEMailAddress(); |
| 485 | 485 | if ($initiatorEmail !== null) { |
| 486 | 486 | $message->setReplyTo([$initiatorEmail => $initiatorDisplayName]); |
| 487 | - $emailTemplate->addFooter($instanceName . ($this->defaults->getSlogan() !== '' ? ' - ' . $this->defaults->getSlogan() : '')); |
|
| 487 | + $emailTemplate->addFooter($instanceName.($this->defaults->getSlogan() !== '' ? ' - '.$this->defaults->getSlogan() : '')); |
|
| 488 | 488 | } else { |
| 489 | 489 | $emailTemplate->addFooter(); |
| 490 | 490 | } |
@@ -495,7 +495,7 @@ discard block |
||
| 495 | 495 | $message->useTemplate($emailTemplate); |
| 496 | 496 | $failedRecipients = $this->mailer->send($message); |
| 497 | 497 | if (!empty($failedRecipients)) { |
| 498 | - $this->logger->error('Share password mail could not be sent to: ' . implode(', ', $failedRecipients)); |
|
| 498 | + $this->logger->error('Share password mail could not be sent to: '.implode(', ', $failedRecipients)); |
|
| 499 | 499 | return false; |
| 500 | 500 | } |
| 501 | 501 | |
@@ -549,7 +549,7 @@ discard block |
||
| 549 | 549 | $message->setFrom([Util::getDefaultEmailAddress($instanceName) => $senderName]); |
| 550 | 550 | if ($this->settingsManager->replyToInitiator() && $initiatorEmailAddress !== null) { |
| 551 | 551 | $message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]); |
| 552 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
| 552 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
| 553 | 553 | } else { |
| 554 | 554 | $emailTemplate->addFooter(); |
| 555 | 555 | } |
@@ -599,7 +599,7 @@ discard block |
||
| 599 | 599 | if ($this->config->getSystemValue('sharing.enable_mail_link_password_expiration', false) === true) { |
| 600 | 600 | $expirationTime = new \DateTime(); |
| 601 | 601 | $expirationInterval = $this->config->getSystemValue('sharing.mail_link_password_expiration_interval', 3600); |
| 602 | - $expirationTime = $expirationTime->add(new \DateInterval('PT' . $expirationInterval . 'S')); |
|
| 602 | + $expirationTime = $expirationTime->add(new \DateInterval('PT'.$expirationInterval.'S')); |
|
| 603 | 603 | $emailTemplate->addBodyText($this->l->t('This password will expire at %s', [$expirationTime->format('r')])); |
| 604 | 604 | } |
| 605 | 605 | |
@@ -694,10 +694,10 @@ discard block |
||
| 694 | 694 | ->setValue('password_expiration_time', $qb->createNamedParameter($passwordExpirationTime, IQueryBuilder::PARAM_DATETIME_MUTABLE)) |
| 695 | 695 | ->setValue('password_by_talk', $qb->createNamedParameter($sendPasswordByTalk, IQueryBuilder::PARAM_BOOL)) |
| 696 | 696 | ->setValue('stime', $qb->createNamedParameter(time())) |
| 697 | - ->setValue('hide_download', $qb->createNamedParameter((int)$hideDownload, IQueryBuilder::PARAM_INT)) |
|
| 697 | + ->setValue('hide_download', $qb->createNamedParameter((int) $hideDownload, IQueryBuilder::PARAM_INT)) |
|
| 698 | 698 | ->setValue('label', $qb->createNamedParameter($label)) |
| 699 | 699 | ->setValue('note', $qb->createNamedParameter($note)) |
| 700 | - ->setValue('mail_send', $qb->createNamedParameter((int)$mailSend, IQueryBuilder::PARAM_INT)); |
|
| 700 | + ->setValue('mail_send', $qb->createNamedParameter((int) $mailSend, IQueryBuilder::PARAM_INT)); |
|
| 701 | 701 | |
| 702 | 702 | // set share attributes |
| 703 | 703 | $shareAttributes = $this->formatShareAttributes($attributes); |
@@ -723,7 +723,7 @@ discard block |
||
| 723 | 723 | if ($validPassword && ($originalShare->getPassword() !== $share->getPassword() |
| 724 | 724 | || ($originalShare->getSendPasswordByTalk() && !$share->getSendPasswordByTalk()))) { |
| 725 | 725 | $emails = $this->getSharedWithEmails($share); |
| 726 | - $validEmails = array_filter($emails, function ($email) { |
|
| 726 | + $validEmails = array_filter($emails, function($email) { |
|
| 727 | 727 | return $this->emailValidator->isValid($email); |
| 728 | 728 | }); |
| 729 | 729 | $this->sendPassword($share, $plainTextPassword, $validEmails); |
@@ -749,9 +749,9 @@ discard block |
||
| 749 | 749 | ->set('password_by_talk', $qb->createNamedParameter($share->getSendPasswordByTalk(), IQueryBuilder::PARAM_BOOL)) |
| 750 | 750 | ->set('expiration', $qb->createNamedParameter($share->getExpirationDate(), IQueryBuilder::PARAM_DATETIME_MUTABLE)) |
| 751 | 751 | ->set('note', $qb->createNamedParameter($share->getNote())) |
| 752 | - ->set('hide_download', $qb->createNamedParameter((int)$share->getHideDownload(), IQueryBuilder::PARAM_INT)) |
|
| 752 | + ->set('hide_download', $qb->createNamedParameter((int) $share->getHideDownload(), IQueryBuilder::PARAM_INT)) |
|
| 753 | 753 | ->set('attributes', $qb->createNamedParameter($shareAttributes)) |
| 754 | - ->set('mail_send', $qb->createNamedParameter((int)$share->getMailSend(), IQueryBuilder::PARAM_INT)) |
|
| 754 | + ->set('mail_send', $qb->createNamedParameter((int) $share->getMailSend(), IQueryBuilder::PARAM_INT)) |
|
| 755 | 755 | ->set('reminder_sent', $qb->createNamedParameter($share->getReminderSent(), IQueryBuilder::PARAM_BOOL)) |
| 756 | 756 | ->executeStatement(); |
| 757 | 757 | |
@@ -783,7 +783,7 @@ discard block |
||
| 783 | 783 | } catch (\Exception $e) { |
| 784 | 784 | } |
| 785 | 785 | |
| 786 | - $this->removeShareFromTable((int)$share->getId()); |
|
| 786 | + $this->removeShareFromTable((int) $share->getId()); |
|
| 787 | 787 | } |
| 788 | 788 | |
| 789 | 789 | /** |
@@ -991,25 +991,25 @@ discard block |
||
| 991 | 991 | */ |
| 992 | 992 | protected function createShareObject(array $data): IShare { |
| 993 | 993 | $share = new Share($this->rootFolder, $this->userManager); |
| 994 | - $share->setId((int)$data['id']) |
|
| 995 | - ->setShareType((int)$data['share_type']) |
|
| 996 | - ->setPermissions((int)$data['permissions']) |
|
| 994 | + $share->setId((int) $data['id']) |
|
| 995 | + ->setShareType((int) $data['share_type']) |
|
| 996 | + ->setPermissions((int) $data['permissions']) |
|
| 997 | 997 | ->setTarget($data['file_target']) |
| 998 | - ->setMailSend((bool)$data['mail_send']) |
|
| 998 | + ->setMailSend((bool) $data['mail_send']) |
|
| 999 | 999 | ->setNote($data['note']) |
| 1000 | 1000 | ->setToken($data['token']); |
| 1001 | 1001 | |
| 1002 | 1002 | $shareTime = new \DateTime(); |
| 1003 | - $shareTime->setTimestamp((int)$data['stime']); |
|
| 1003 | + $shareTime->setTimestamp((int) $data['stime']); |
|
| 1004 | 1004 | $share->setShareTime($shareTime); |
| 1005 | 1005 | $share->setSharedWith($data['share_with'] ?? ''); |
| 1006 | 1006 | $share->setPassword($data['password']); |
| 1007 | 1007 | $passwordExpirationTime = \DateTime::createFromFormat('Y-m-d H:i:s', $data['password_expiration_time'] ?? ''); |
| 1008 | 1008 | $share->setPasswordExpirationTime($passwordExpirationTime !== false ? $passwordExpirationTime : null); |
| 1009 | 1009 | $share->setLabel($data['label'] ?? ''); |
| 1010 | - $share->setSendPasswordByTalk((bool)$data['password_by_talk']); |
|
| 1011 | - $share->setHideDownload((bool)$data['hide_download']); |
|
| 1012 | - $share->setReminderSent((bool)$data['reminder_sent']); |
|
| 1010 | + $share->setSendPasswordByTalk((bool) $data['password_by_talk']); |
|
| 1011 | + $share->setHideDownload((bool) $data['hide_download']); |
|
| 1012 | + $share->setReminderSent((bool) $data['reminder_sent']); |
|
| 1013 | 1013 | |
| 1014 | 1014 | if ($data['uid_initiator'] !== null) { |
| 1015 | 1015 | $share->setShareOwner($data['uid_owner']); |
@@ -1017,7 +1017,7 @@ discard block |
||
| 1017 | 1017 | } else { |
| 1018 | 1018 | //OLD SHARE |
| 1019 | 1019 | $share->setSharedBy($data['uid_owner']); |
| 1020 | - $path = $this->getNode($share->getSharedBy(), (int)$data['file_source']); |
|
| 1020 | + $path = $this->getNode($share->getSharedBy(), (int) $data['file_source']); |
|
| 1021 | 1021 | |
| 1022 | 1022 | $owner = $path->getOwner(); |
| 1023 | 1023 | $share->setShareOwner($owner->getUID()); |
@@ -1032,7 +1032,7 @@ discard block |
||
| 1032 | 1032 | |
| 1033 | 1033 | $share = $this->updateShareAttributes($share, $data['attributes']); |
| 1034 | 1034 | |
| 1035 | - $share->setNodeId((int)$data['file_source']); |
|
| 1035 | + $share->setNodeId((int) $data['file_source']); |
|
| 1036 | 1036 | $share->setNodeType($data['item_type']); |
| 1037 | 1037 | |
| 1038 | 1038 | $share->setProviderId($this->identifier()); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | $this->l = $this->createMock(IL10N::class); |
| 79 | 79 | $this->l->method('t') |
| 80 | - ->willReturnCallback(function ($text, $parameters = []) { |
|
| 80 | + ->willReturnCallback(function($text, $parameters = []) { |
|
| 81 | 81 | return vsprintf($text, $parameters); |
| 82 | 82 | }); |
| 83 | 83 | $this->config = $this->createMock(IConfig::class); |
@@ -393,7 +393,7 @@ discard block |
||
| 393 | 393 | ]; |
| 394 | 394 | $this->mailer->expects($this->exactly(2)) |
| 395 | 395 | ->method('createEMailTemplate') |
| 396 | - ->willReturnCallback(function () use (&$calls) { |
|
| 396 | + ->willReturnCallback(function() use (&$calls) { |
|
| 397 | 397 | $expected = array_shift($calls); |
| 398 | 398 | $this->assertEquals($expected, func_get_args()); |
| 399 | 399 | return $this->createMock(IEMailTemplate::class); |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | ]; |
| 476 | 476 | $this->mailer->expects($this->exactly(2)) |
| 477 | 477 | ->method('createEMailTemplate') |
| 478 | - ->willReturnCallback(function () use (&$calls) { |
|
| 478 | + ->willReturnCallback(function() use (&$calls) { |
|
| 479 | 479 | $expected = array_shift($calls); |
| 480 | 480 | $this->assertEquals($expected, func_get_args()); |
| 481 | 481 | return $this->createMock(IEMailTemplate::class); |
@@ -540,7 +540,7 @@ discard block |
||
| 540 | 540 | ]; |
| 541 | 541 | $message->expects($this->exactly(2)) |
| 542 | 542 | ->method('setTo') |
| 543 | - ->willReturnCallback(function () use (&$setToCalls, $message) { |
|
| 543 | + ->willReturnCallback(function() use (&$setToCalls, $message) { |
|
| 544 | 544 | $expected = array_shift($setToCalls); |
| 545 | 545 | $this->assertEquals($expected, func_get_args()); |
| 546 | 546 | return $message; |
@@ -572,7 +572,7 @@ discard block |
||
| 572 | 572 | ]; |
| 573 | 573 | $this->mailer->expects($this->exactly(2)) |
| 574 | 574 | ->method('createEMailTemplate') |
| 575 | - ->willReturnCallback(function () use (&$calls) { |
|
| 575 | + ->willReturnCallback(function() use (&$calls) { |
|
| 576 | 576 | $expected = array_shift($calls); |
| 577 | 577 | $this->assertEquals($expected, func_get_args()); |
| 578 | 578 | return $this->createMock(IEMailTemplate::class); |
@@ -752,17 +752,17 @@ discard block |
||
| 752 | 752 | |
| 753 | 753 | $this->assertSame(1, count($result)); |
| 754 | 754 | |
| 755 | - $this->assertSame($itemSource, (int)$result[0]['item_source']); |
|
| 755 | + $this->assertSame($itemSource, (int) $result[0]['item_source']); |
|
| 756 | 756 | $this->assertSame($itemType, $result[0]['item_type']); |
| 757 | 757 | $this->assertSame($shareWith, $result[0]['share_with']); |
| 758 | 758 | $this->assertSame($sharedBy, $result[0]['uid_initiator']); |
| 759 | 759 | $this->assertSame($uidOwner, $result[0]['uid_owner']); |
| 760 | - $this->assertSame($permissions, (int)$result[0]['permissions']); |
|
| 760 | + $this->assertSame($permissions, (int) $result[0]['permissions']); |
|
| 761 | 761 | $this->assertSame($token, $result[0]['token']); |
| 762 | 762 | $this->assertSame($password, $result[0]['password']); |
| 763 | 763 | $this->assertSame($passwordExpirationTime->getTimestamp(), \DateTime::createFromFormat('Y-m-d H:i:s', $result[0]['password_expiration_time'])->getTimestamp()); |
| 764 | - $this->assertSame($sendPasswordByTalk, (bool)$result[0]['password_by_talk']); |
|
| 765 | - $this->assertSame($hideDownload, (bool)$result[0]['hide_download']); |
|
| 764 | + $this->assertSame($sendPasswordByTalk, (bool) $result[0]['password_by_talk']); |
|
| 765 | + $this->assertSame($hideDownload, (bool) $result[0]['hide_download']); |
|
| 766 | 766 | $this->assertSame($label, $result[0]['label']); |
| 767 | 767 | $this->assertSame($expiration->getTimestamp(), \DateTime::createFromFormat('Y-m-d H:i:s', $result[0]['expiration'])->getTimestamp()); |
| 768 | 768 | } |
@@ -805,12 +805,12 @@ discard block |
||
| 805 | 805 | |
| 806 | 806 | $this->assertSame(1, count($result)); |
| 807 | 807 | |
| 808 | - $this->assertSame($itemSource, (int)$result[0]['item_source']); |
|
| 808 | + $this->assertSame($itemSource, (int) $result[0]['item_source']); |
|
| 809 | 809 | $this->assertSame($itemType, $result[0]['item_type']); |
| 810 | 810 | $this->assertSame($shareWith, $result[0]['share_with']); |
| 811 | 811 | $this->assertSame($sharedBy, $result[0]['uid_initiator']); |
| 812 | 812 | $this->assertSame($uidOwner, $result[0]['uid_owner']); |
| 813 | - $this->assertSame($permissions + 1, (int)$result[0]['permissions']); |
|
| 813 | + $this->assertSame($permissions + 1, (int) $result[0]['permissions']); |
|
| 814 | 814 | $this->assertSame($token, $result[0]['token']); |
| 815 | 815 | $this->assertSame($note, $result[0]['note']); |
| 816 | 816 | } |
@@ -893,10 +893,10 @@ discard block |
||
| 893 | 893 | |
| 894 | 894 | $instance->expects($this->once())->method('createShareObject') |
| 895 | 895 | ->willReturnCallback( |
| 896 | - function ($data) use ($uidOwner, $sharedBy, $id2) { |
|
| 896 | + function($data) use ($uidOwner, $sharedBy, $id2) { |
|
| 897 | 897 | $this->assertSame($uidOwner, $data['uid_owner']); |
| 898 | 898 | $this->assertSame($sharedBy, $data['uid_initiator']); |
| 899 | - $this->assertSame($id2, (int)$data['id']); |
|
| 899 | + $this->assertSame($id2, (int) $data['id']); |
|
| 900 | 900 | return $this->share; |
| 901 | 901 | } |
| 902 | 902 | ); |
@@ -945,10 +945,10 @@ discard block |
||
| 945 | 945 | |
| 946 | 946 | $instance->expects($this->once())->method('createShareObject') |
| 947 | 947 | ->willReturnCallback( |
| 948 | - function ($data) use ($uidOwner, $sharedBy, $id) { |
|
| 948 | + function($data) use ($uidOwner, $sharedBy, $id) { |
|
| 949 | 949 | $this->assertSame($uidOwner, $data['uid_owner']); |
| 950 | 950 | $this->assertSame($sharedBy, $data['uid_initiator']); |
| 951 | - $this->assertSame($id, (int)$data['id']); |
|
| 951 | + $this->assertSame($id, (int) $data['id']); |
|
| 952 | 952 | return $this->share; |
| 953 | 953 | } |
| 954 | 954 | ); |
@@ -978,8 +978,8 @@ discard block |
||
| 978 | 978 | |
| 979 | 979 | $instance->expects($this->once())->method('createShareObject') |
| 980 | 980 | ->willReturnCallback( |
| 981 | - function ($data) use ($idMail) { |
|
| 982 | - $this->assertSame($idMail, (int)$data['id']); |
|
| 981 | + function($data) use ($idMail) { |
|
| 982 | + $this->assertSame($idMail, (int) $data['id']); |
|
| 983 | 983 | return $this->share; |
| 984 | 984 | } |
| 985 | 985 | ); |
@@ -1088,7 +1088,7 @@ discard block |
||
| 1088 | 1088 | |
| 1089 | 1089 | $this->assertTrue(is_array($after)); |
| 1090 | 1090 | $this->assertSame(1, count($after)); |
| 1091 | - $this->assertSame($id, (int)$after[0]['id']); |
|
| 1091 | + $this->assertSame($id, (int) $after[0]['id']); |
|
| 1092 | 1092 | } |
| 1093 | 1093 | |
| 1094 | 1094 | public function testGetRawShare(): void { |
@@ -1107,12 +1107,12 @@ discard block |
||
| 1107 | 1107 | $result = $this->invokePrivate($instance, 'getRawShare', [$id]); |
| 1108 | 1108 | |
| 1109 | 1109 | $this->assertTrue(is_array($result)); |
| 1110 | - $this->assertSame($itemSource, (int)$result['item_source']); |
|
| 1110 | + $this->assertSame($itemSource, (int) $result['item_source']); |
|
| 1111 | 1111 | $this->assertSame($itemType, $result['item_type']); |
| 1112 | 1112 | $this->assertSame($shareWith, $result['share_with']); |
| 1113 | 1113 | $this->assertSame($sharedBy, $result['uid_initiator']); |
| 1114 | 1114 | $this->assertSame($uidOwner, $result['uid_owner']); |
| 1115 | - $this->assertSame($permissions, (int)$result['permissions']); |
|
| 1115 | + $this->assertSame($permissions, (int) $result['permissions']); |
|
| 1116 | 1116 | $this->assertSame($token, $result['token']); |
| 1117 | 1117 | } |
| 1118 | 1118 | |
@@ -1159,7 +1159,7 @@ discard block |
||
| 1159 | 1159 | $qb->execute(); |
| 1160 | 1160 | $id = $qb->getLastInsertId(); |
| 1161 | 1161 | |
| 1162 | - return (int)$id; |
|
| 1162 | + return (int) $id; |
|
| 1163 | 1163 | } |
| 1164 | 1164 | |
| 1165 | 1165 | public function testGetSharesInFolder(): void { |
@@ -1172,8 +1172,8 @@ discard block |
||
| 1172 | 1172 | |
| 1173 | 1173 | $provider = $this->getInstance(['sendMailNotification', 'createShareActivity']); |
| 1174 | 1174 | |
| 1175 | - $u1 = $userManager->createUser('testFed', md5((string)time())); |
|
| 1176 | - $u2 = $userManager->createUser('testFed2', md5((string)time())); |
|
| 1175 | + $u1 = $userManager->createUser('testFed', md5((string) time())); |
|
| 1176 | + $u2 = $userManager->createUser('testFed2', md5((string) time())); |
|
| 1177 | 1177 | |
| 1178 | 1178 | $folder1 = $rootFolder->getUserFolder($u1->getUID())->newFolder('foo'); |
| 1179 | 1179 | $file1 = $folder1->newFile('bar1'); |
@@ -1218,8 +1218,8 @@ discard block |
||
| 1218 | 1218 | |
| 1219 | 1219 | $provider = $this->getInstance(['sendMailNotification', 'createShareActivity']); |
| 1220 | 1220 | |
| 1221 | - $u1 = $userManager->createUser('testFed', md5((string)time())); |
|
| 1222 | - $u2 = $userManager->createUser('testFed2', md5((string)time())); |
|
| 1221 | + $u1 = $userManager->createUser('testFed', md5((string) time())); |
|
| 1222 | + $u2 = $userManager->createUser('testFed2', md5((string) time())); |
|
| 1223 | 1223 | |
| 1224 | 1224 | $folder = $rootFolder->getUserFolder($u1->getUID())->newFolder('foo'); |
| 1225 | 1225 | |
@@ -125,10 +125,10 @@ discard block |
||
| 125 | 125 | 'DTSTART' => new \DateTime('2016-01-01 00:00:00') |
| 126 | 126 | ], [])); |
| 127 | 127 | $message->message->VEVENT->add('ORGANIZER', 'mailto:[email protected]'); |
| 128 | - $message->message->VEVENT->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE']); |
|
| 128 | + $message->message->VEVENT->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE']); |
|
| 129 | 129 | $message->sender = 'mailto:[email protected]'; |
| 130 | 130 | $message->senderName = 'Mr. Wizard'; |
| 131 | - $message->recipient = 'mailto:' . '[email protected]'; |
|
| 131 | + $message->recipient = 'mailto:'.'[email protected]'; |
|
| 132 | 132 | $message->significantChange = false; |
| 133 | 133 | $this->plugin->schedule($message); |
| 134 | 134 | $this->assertEquals('1.0', $message->getScheduleStatus()); |
@@ -145,11 +145,11 @@ discard block |
||
| 145 | 145 | 'DTSTART' => new \DateTime('2016-01-01 00:00:00') |
| 146 | 146 | ], [])); |
| 147 | 147 | $newVevent->add('ORGANIZER', 'mailto:[email protected]'); |
| 148 | - $newVevent->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 148 | + $newVevent->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 149 | 149 | $message->message = $newVCalendar; |
| 150 | 150 | $message->sender = 'mailto:[email protected]'; |
| 151 | 151 | $message->senderName = 'Mr. Wizard'; |
| 152 | - $message->recipient = 'mailto:' . '[email protected]'; |
|
| 152 | + $message->recipient = 'mailto:'.'[email protected]'; |
|
| 153 | 153 | // save the old copy in the plugin |
| 154 | 154 | $oldVCalendar = new VCalendar(); |
| 155 | 155 | $oldVEvent = new VEvent($oldVCalendar, 'one', [ |
@@ -159,8 +159,8 @@ discard block |
||
| 159 | 159 | 'DTSTART' => new \DateTime('2016-01-01 00:00:00') |
| 160 | 160 | ]); |
| 161 | 161 | $oldVEvent->add('ORGANIZER', 'mailto:[email protected]'); |
| 162 | - $oldVEvent->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 163 | - $oldVEvent->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE']); |
|
| 162 | + $oldVEvent->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 163 | + $oldVEvent->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE']); |
|
| 164 | 164 | $oldVCalendar->add($oldVEvent); |
| 165 | 165 | $data = ['invitee_name' => 'Mr. Wizard', |
| 166 | 166 | 'meeting_title' => 'Fellowship meeting without (!) Boromir', |
@@ -248,11 +248,11 @@ discard block |
||
| 248 | 248 | 'DTSTART' => new \DateTime('2016-01-01 00:00:00') |
| 249 | 249 | ], [])); |
| 250 | 250 | $newVevent->add('ORGANIZER', 'mailto:[email protected]'); |
| 251 | - $newVevent->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE', 'CN' => 'The Shire', 'CUTYPE' => 'ROOM']); |
|
| 251 | + $newVevent->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE', 'CN' => 'The Shire', 'CUTYPE' => 'ROOM']); |
|
| 252 | 252 | $message->message = $newVCalendar; |
| 253 | 253 | $message->sender = 'mailto:[email protected]'; |
| 254 | 254 | $message->senderName = 'Mr. Wizard'; |
| 255 | - $message->recipient = 'mailto:' . '[email protected]'; |
|
| 255 | + $message->recipient = 'mailto:'.'[email protected]'; |
|
| 256 | 256 | // save the old copy in the plugin |
| 257 | 257 | $oldVCalendar = new VCalendar(); |
| 258 | 258 | $oldVEvent = new VEvent($oldVCalendar, 'one', [ |
@@ -262,8 +262,8 @@ discard block |
||
| 262 | 262 | 'DTSTART' => new \DateTime('2016-01-01 00:00:00') |
| 263 | 263 | ]); |
| 264 | 264 | $oldVEvent->add('ORGANIZER', 'mailto:[email protected]'); |
| 265 | - $oldVEvent->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE', 'CN' => 'The Shire', 'CUTYPE' => 'ROOM']); |
|
| 266 | - $oldVEvent->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE']); |
|
| 265 | + $oldVEvent->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE', 'CN' => 'The Shire', 'CUTYPE' => 'ROOM']); |
|
| 266 | + $oldVEvent->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE']); |
|
| 267 | 267 | $oldVCalendar->add($oldVEvent); |
| 268 | 268 | $data = ['invitee_name' => 'Mr. Wizard', |
| 269 | 269 | 'meeting_title' => 'Fellowship meeting without (!) Boromir', |
@@ -337,12 +337,12 @@ discard block |
||
| 337 | 337 | 'DTSTART' => new \DateTime('2016-01-01 00:00:00') |
| 338 | 338 | ], [])); |
| 339 | 339 | $newVevent->add('ORGANIZER', 'mailto:[email protected]'); |
| 340 | - $newVevent->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE', 'CN' => 'The Fellowship', 'CUTYPE' => 'GROUP']); |
|
| 341 | - $newVevent->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE', 'MEMBER' => '[email protected]']); |
|
| 340 | + $newVevent->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE', 'CN' => 'The Fellowship', 'CUTYPE' => 'GROUP']); |
|
| 341 | + $newVevent->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE', 'MEMBER' => '[email protected]']); |
|
| 342 | 342 | $message->message = $newVCalendar; |
| 343 | 343 | $message->sender = 'mailto:[email protected]'; |
| 344 | 344 | $message->senderName = 'Mr. Wizard'; |
| 345 | - $message->recipient = 'mailto:' . '[email protected]'; |
|
| 345 | + $message->recipient = 'mailto:'.'[email protected]'; |
|
| 346 | 346 | $attendees = $newVevent->select('ATTENDEE'); |
| 347 | 347 | $circle = ''; |
| 348 | 348 | foreach ($attendees as $attendee) { |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | 'RRULE' => 'FREQ=DAILY;INTERVAL=1;UNTIL=20160201T000000Z' |
| 416 | 416 | ]); |
| 417 | 417 | $newVevent->add('ORGANIZER', 'mailto:[email protected]'); |
| 418 | - $newVevent->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 418 | + $newVevent->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 419 | 419 | $newvEvent2 = new VEvent($newVCalendar, 'two', [ |
| 420 | 420 | 'UID' => 'uid-1234', |
| 421 | 421 | 'SEQUENCE' => 1, |
@@ -424,10 +424,10 @@ discard block |
||
| 424 | 424 | 'RECURRENCE-ID' => new \DateTime('2016-01-01 00:00:00') |
| 425 | 425 | ]); |
| 426 | 426 | $newvEvent2->add('ORGANIZER', 'mailto:[email protected]'); |
| 427 | - $newvEvent2->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 427 | + $newvEvent2->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 428 | 428 | $message->message = $newVCalendar; |
| 429 | 429 | $message->sender = 'mailto:[email protected]'; |
| 430 | - $message->recipient = 'mailto:' . '[email protected]'; |
|
| 430 | + $message->recipient = 'mailto:'.'[email protected]'; |
|
| 431 | 431 | // save the old copy in the plugin |
| 432 | 432 | $oldVCalendar = new VCalendar(); |
| 433 | 433 | $oldVEvent = new VEvent($oldVCalendar, 'one', [ |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | 'RRULE' => 'FREQ=DAILY;INTERVAL=1;UNTIL=20160201T000000Z' |
| 440 | 440 | ]); |
| 441 | 441 | $oldVEvent->add('ORGANIZER', 'mailto:[email protected]'); |
| 442 | - $oldVEvent->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 442 | + $oldVEvent->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 443 | 443 | $data = ['invitee_name' => 'Mr. Wizard', |
| 444 | 444 | 'meeting_title' => 'Elevenses', |
| 445 | 445 | 'attendee_name' => '[email protected]' |
@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | ->willReturn(1496912700); |
| 458 | 458 | $this->eventComparisonService->expects(self::once()) |
| 459 | 459 | ->method('findModified') |
| 460 | - ->willReturn(['old' => [] ,'new' => [$newVevent]]); |
|
| 460 | + ->willReturn(['old' => [], 'new' => [$newVevent]]); |
|
| 461 | 461 | $this->service->expects(self::once()) |
| 462 | 462 | ->method('getCurrentAttendee') |
| 463 | 463 | ->with($message) |
@@ -526,10 +526,10 @@ discard block |
||
| 526 | 526 | 'DTSTART' => new \DateTime('2016-01-01 00:00:00') |
| 527 | 527 | ], [])); |
| 528 | 528 | $message->message->VEVENT->add('ORGANIZER', 'mailto:[email protected]'); |
| 529 | - $message->message->VEVENT->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE']); |
|
| 529 | + $message->message->VEVENT->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE']); |
|
| 530 | 530 | $message->sender = 'mailto:[email protected]'; |
| 531 | 531 | $message->senderName = 'Mr. Wizard'; |
| 532 | - $message->recipient = 'mailto:' . 'frodo@@hobb.it'; |
|
| 532 | + $message->recipient = 'mailto:'.'frodo@@hobb.it'; |
|
| 533 | 533 | |
| 534 | 534 | $this->service->expects(self::once()) |
| 535 | 535 | ->method('getLastOccurrence') |
@@ -550,11 +550,11 @@ discard block |
||
| 550 | 550 | 'DTSTART' => new \DateTime('2016-01-01 00:00:00') |
| 551 | 551 | ], [])); |
| 552 | 552 | $newVevent->add('ORGANIZER', 'mailto:[email protected]'); |
| 553 | - $newVevent->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 553 | + $newVevent->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 554 | 554 | $message->message = $newVcalendar; |
| 555 | 555 | $message->sender = 'mailto:[email protected]'; |
| 556 | 556 | $message->senderName = 'Mr. Wizard'; |
| 557 | - $message->recipient = 'mailto:' . '[email protected]'; |
|
| 557 | + $message->recipient = 'mailto:'.'[email protected]'; |
|
| 558 | 558 | // save the old copy in the plugin |
| 559 | 559 | $oldVcalendar = new VCalendar(); |
| 560 | 560 | $oldVevent = new VEvent($oldVcalendar, 'one', [ |
@@ -564,8 +564,8 @@ discard block |
||
| 564 | 564 | 'DTSTART' => new \DateTime('2016-01-01 00:00:00') |
| 565 | 565 | ]); |
| 566 | 566 | $oldVevent->add('ORGANIZER', 'mailto:[email protected]'); |
| 567 | - $oldVevent->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 568 | - $oldVevent->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE']); |
|
| 567 | + $oldVevent->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 568 | + $oldVevent->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE']); |
|
| 569 | 569 | $oldVcalendar->add($oldVevent); |
| 570 | 570 | $data = ['invitee_name' => 'Mr. Wizard', |
| 571 | 571 | 'meeting_title' => 'Fellowship meeting without (!) Boromir', |
@@ -584,7 +584,7 @@ discard block |
||
| 584 | 584 | ->willReturn(1496912700); |
| 585 | 585 | $this->eventComparisonService->expects(self::once()) |
| 586 | 586 | ->method('findModified') |
| 587 | - ->willReturn(['old' => [] ,'new' => [$newVevent]]); |
|
| 587 | + ->willReturn(['old' => [], 'new' => [$newVevent]]); |
|
| 588 | 588 | $this->service->expects(self::once()) |
| 589 | 589 | ->method('getCurrentAttendee') |
| 590 | 590 | ->with($message) |
@@ -659,11 +659,11 @@ discard block |
||
| 659 | 659 | 'DTSTART' => new \DateTime('2016-01-01 00:00:00') |
| 660 | 660 | ], [])); |
| 661 | 661 | $event->add('ORGANIZER', 'mailto:[email protected]'); |
| 662 | - $event->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 662 | + $event->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 663 | 663 | $message->message = $calendar; |
| 664 | 664 | $message->sender = 'mailto:[email protected]'; |
| 665 | 665 | $message->senderName = 'Mr. Wizard'; |
| 666 | - $message->recipient = 'mailto:' . '[email protected]'; |
|
| 666 | + $message->recipient = 'mailto:'.'[email protected]'; |
|
| 667 | 667 | // construct |
| 668 | 668 | foreach ($event->select('ATTENDEE') as $entry) { |
| 669 | 669 | if (strcasecmp($entry->getValue(), $message->recipient) === 0) { |
@@ -734,7 +734,7 @@ discard block |
||
| 734 | 734 | ->with($this->emailTemplate, 'token'); |
| 735 | 735 | $this->eventComparisonService->expects(self::once()) |
| 736 | 736 | ->method('findModified') |
| 737 | - ->willReturn(['old' => [] ,'new' => [$event]]); |
|
| 737 | + ->willReturn(['old' => [], 'new' => [$event]]); |
|
| 738 | 738 | // construct mail provider mock returns |
| 739 | 739 | $this->mailService |
| 740 | 740 | ->method('initiateMessage') |
@@ -762,11 +762,11 @@ discard block |
||
| 762 | 762 | 'DTSTART' => new \DateTime('2016-01-01 00:00:00') |
| 763 | 763 | ], [])); |
| 764 | 764 | $newVevent->add('ORGANIZER', 'mailto:[email protected]'); |
| 765 | - $newVevent->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 765 | + $newVevent->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 766 | 766 | $message->message = $newVCalendar; |
| 767 | 767 | $message->sender = 'mailto:[email protected]'; |
| 768 | 768 | $message->senderName = 'Mr. Wizard'; |
| 769 | - $message->recipient = 'mailto:' . '[email protected]'; |
|
| 769 | + $message->recipient = 'mailto:'.'[email protected]'; |
|
| 770 | 770 | // save the old copy in the plugin |
| 771 | 771 | $oldVCalendar = new VCalendar(); |
| 772 | 772 | $oldVEvent = new VEvent($oldVCalendar, 'one', [ |
@@ -776,8 +776,8 @@ discard block |
||
| 776 | 776 | 'DTSTART' => new \DateTime('2016-01-01 00:00:00') |
| 777 | 777 | ]); |
| 778 | 778 | $oldVEvent->add('ORGANIZER', 'mailto:[email protected]'); |
| 779 | - $oldVEvent->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 780 | - $oldVEvent->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE']); |
|
| 779 | + $oldVEvent->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 780 | + $oldVEvent->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE']); |
|
| 781 | 781 | $oldVCalendar->add($oldVEvent); |
| 782 | 782 | $data = ['invitee_name' => 'Mr. Wizard', |
| 783 | 783 | 'meeting_title' => 'Fellowship meeting without (!) Boromir', |
@@ -869,11 +869,11 @@ discard block |
||
| 869 | 869 | 'DTSTART' => new \DateTime('2016-01-01 00:00:00') |
| 870 | 870 | ], [])); |
| 871 | 871 | $newVevent->add('ORGANIZER', 'mailto:[email protected]'); |
| 872 | - $newVevent->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 872 | + $newVevent->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 873 | 873 | $message->message = $newVCalendar; |
| 874 | 874 | $message->sender = 'mailto:[email protected]'; |
| 875 | 875 | $message->senderName = 'Mr. Wizard'; |
| 876 | - $message->recipient = 'mailto:' . '[email protected]'; |
|
| 876 | + $message->recipient = 'mailto:'.'[email protected]'; |
|
| 877 | 877 | $data = ['invitee_name' => 'Mr. Wizard', |
| 878 | 878 | 'meeting_title' => 'Fellowship meeting', |
| 879 | 879 | 'attendee_name' => '[email protected]' |
@@ -891,7 +891,7 @@ discard block |
||
| 891 | 891 | $this->eventComparisonService->expects(self::once()) |
| 892 | 892 | ->method('findModified') |
| 893 | 893 | ->with($newVCalendar, null) |
| 894 | - ->willReturn(['old' => [] ,'new' => [$newVevent]]); |
|
| 894 | + ->willReturn(['old' => [], 'new' => [$newVevent]]); |
|
| 895 | 895 | $this->service->expects(self::once()) |
| 896 | 896 | ->method('getCurrentAttendee') |
| 897 | 897 | ->with($message) |
@@ -963,10 +963,10 @@ discard block |
||
| 963 | 963 | 'DTSTART' => new \DateTime('2016-01-01 00:00:00') |
| 964 | 964 | ], [])); |
| 965 | 965 | $newVevent->add('ORGANIZER', 'mailto:[email protected]'); |
| 966 | - $newVevent->add('ATTENDEE', 'mailto:' . '[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 966 | + $newVevent->add('ATTENDEE', 'mailto:'.'[email protected]', ['RSVP' => 'TRUE', 'CN' => 'Frodo']); |
|
| 967 | 967 | $message->message = $newVCalendar; |
| 968 | 968 | $message->sender = 'mailto:[email protected]'; |
| 969 | - $message->recipient = 'mailto:' . '[email protected]'; |
|
| 969 | + $message->recipient = 'mailto:'.'[email protected]'; |
|
| 970 | 970 | $data = ['invitee_name' => 'Mr. Wizard', |
| 971 | 971 | 'meeting_title' => 'Fellowship meeting', |
| 972 | 972 | 'attendee_name' => '[email protected]' |
@@ -984,7 +984,7 @@ discard block |
||
| 984 | 984 | $this->eventComparisonService->expects(self::once()) |
| 985 | 985 | ->method('findModified') |
| 986 | 986 | ->with($newVCalendar, null) |
| 987 | - ->willReturn(['old' => [] ,'new' => [$newVevent]]); |
|
| 987 | + ->willReturn(['old' => [], 'new' => [$newVevent]]); |
|
| 988 | 988 | $this->service->expects(self::once()) |
| 989 | 989 | ->method('getCurrentAttendee') |
| 990 | 990 | ->with($message) |