diff options
Diffstat (limited to 'apps/files_sharing/lib/Activity/Providers/Base.php')
-rw-r--r-- | apps/files_sharing/lib/Activity/Providers/Base.php | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/apps/files_sharing/lib/Activity/Providers/Base.php b/apps/files_sharing/lib/Activity/Providers/Base.php index ca5b9b55b62..4a2c6ac919e 100644 --- a/apps/files_sharing/lib/Activity/Providers/Base.php +++ b/apps/files_sharing/lib/Activity/Providers/Base.php @@ -31,12 +31,10 @@ use OCP\Contacts\IManager as IContactsManager; use OCP\Federation\ICloudIdManager; use OCP\IL10N; use OCP\IURLGenerator; -use OCP\IUser; use OCP\IUserManager; use OCP\L10N\IFactory; abstract class Base implements IProvider { - /** @var IFactory */ protected $languageFactory; @@ -124,24 +122,10 @@ abstract class Base implements IProvider { abstract protected function parseLongVersion(IEvent $event, IEvent $previousEvent = null); /** - * @param IEvent $event - * @param string $subject - * @param array $parameters * @throws \InvalidArgumentException */ - protected function setSubjects(IEvent $event, $subject, array $parameters) { - $placeholders = $replacements = []; - foreach ($parameters as $placeholder => $parameter) { - $placeholders[] = '{' . $placeholder . '}'; - if ($parameter['type'] === 'file') { - $replacements[] = $parameter['path']; - } else { - $replacements[] = $parameter['name']; - } - } - - $event->setParsedSubject(str_replace($placeholders, $replacements, $subject)) - ->setRichSubject($subject, $parameters); + protected function setSubjects(IEvent $event, string $subject, array $parameters): void { + $event->setRichSubject($subject, $parameters); } /** |