diff --git a/src/MessageHandler/ActivityPub/Inbox/AnnounceHandler.php b/src/MessageHandler/ActivityPub/Inbox/AnnounceHandler.php index 21e2b1110..053495eab 100644 --- a/src/MessageHandler/ActivityPub/Inbox/AnnounceHandler.php +++ b/src/MessageHandler/ActivityPub/Inbox/AnnounceHandler.php @@ -24,7 +24,7 @@ public function __construct( private readonly ActivityPubManager $activityPubManager, private readonly EntityManagerInterface $entityManager, private readonly MessageBusInterface $bus, - private readonly VoteManager $manager, + private readonly VoteManager $voteManager, private readonly VoteHandleSubscriber $voteHandleSubscriber, private readonly LoggerInterface $logger, ) { @@ -57,7 +57,7 @@ public function doWork(MessageInterface $message): void $actor = $this->activityPubManager->findActorOrCreate($message->payload['actor']); if ($actor instanceof User) { - $this->manager->upvote($entity, $actor); + $this->voteManager->upvote($entity, $actor); $this->voteHandleSubscriber->clearCache($entity); } else { $entity->lastActive = new \DateTime(); diff --git a/src/MessageHandler/ActivityPub/Inbox/LikeHandler.php b/src/MessageHandler/ActivityPub/Inbox/LikeHandler.php index a2f92f044..840e2456c 100644 --- a/src/MessageHandler/ActivityPub/Inbox/LikeHandler.php +++ b/src/MessageHandler/ActivityPub/Inbox/LikeHandler.php @@ -29,7 +29,7 @@ public function __construct( private readonly ActivityPubManager $activityPubManager, private readonly VoteManager $voteManager, private readonly MessageBusInterface $bus, - private readonly FavouriteManager $manager, + private readonly FavouriteManager $favouriteManager, private readonly LoggerInterface $logger, ) { parent::__construct($this->entityManager); @@ -66,7 +66,7 @@ public function doWork(MessageInterface $message): void $actor = $this->activityPubManager->findActorOrCreate($message->payload['actor']); // Check if actor and entity aren't empty if (!empty($actor) && !empty($entity)) { - $this->manager->toggle($actor, $entity, FavouriteManager::TYPE_LIKE); + $$this->favouriteManager->toggle($actor, $entity, FavouriteManager::TYPE_LIKE); } } elseif ('Undo' === $message->payload['type']) { if ('Like' === $message->payload['object']['type']) { @@ -78,7 +78,7 @@ public function doWork(MessageInterface $message): void $actor = $this->activityPubManager->findActorOrCreate($message->payload['actor']); // Check if actor and entity aren't empty if (!empty($actor) && !empty($entity)) { - $this->manager->toggle($actor, $entity, FavouriteManager::TYPE_UNLIKE); + $$this->favouriteManager->toggle($actor, $entity, FavouriteManager::TYPE_UNLIKE); $this->voteManager->removeVote($entity, $actor); } } diff --git a/src/MessageHandler/Notification/SentEntryCommentCreatedNotificationHandler.php b/src/MessageHandler/Notification/SentEntryCommentCreatedNotificationHandler.php index 52b87dcdf..8d0d6dd2d 100644 --- a/src/MessageHandler/Notification/SentEntryCommentCreatedNotificationHandler.php +++ b/src/MessageHandler/Notification/SentEntryCommentCreatedNotificationHandler.php @@ -19,7 +19,7 @@ class SentEntryCommentCreatedNotificationHandler extends MbinMessageHandler public function __construct( private readonly EntityManagerInterface $entityManager, private readonly EntryCommentRepository $repository, - private readonly NotificationManager $manager + private readonly NotificationManager $notificationManager ) { parent::__construct($this->entityManager); } @@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void throw new UnrecoverableMessageHandlingException('Comment not found'); } - $this->manager->sendCreated($comment); + $this->notificationManager->sendCreated($comment); } } diff --git a/src/MessageHandler/Notification/SentEntryCommentDeletedNotificationHandler.php b/src/MessageHandler/Notification/SentEntryCommentDeletedNotificationHandler.php index b4eb80e36..c9d6487f4 100644 --- a/src/MessageHandler/Notification/SentEntryCommentDeletedNotificationHandler.php +++ b/src/MessageHandler/Notification/SentEntryCommentDeletedNotificationHandler.php @@ -19,7 +19,7 @@ class SentEntryCommentDeletedNotificationHandler extends MbinMessageHandler public function __construct( private readonly EntityManagerInterface $entityManager, private readonly EntryCommentRepository $repository, - private readonly NotificationManager $manager + private readonly NotificationManager $notificationManager ) { parent::__construct($this->entityManager); } @@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void throw new UnrecoverableMessageHandlingException('Comment not found'); } - $this->manager->sendDeleted($comment); + $this->notificationManager->sendDeleted($comment); } } diff --git a/src/MessageHandler/Notification/SentEntryCommentEditedNotificationHandler.php b/src/MessageHandler/Notification/SentEntryCommentEditedNotificationHandler.php index fc62b9ac5..e82539712 100644 --- a/src/MessageHandler/Notification/SentEntryCommentEditedNotificationHandler.php +++ b/src/MessageHandler/Notification/SentEntryCommentEditedNotificationHandler.php @@ -19,7 +19,7 @@ class SentEntryCommentEditedNotificationHandler extends MbinMessageHandler public function __construct( private readonly EntityManagerInterface $entityManager, private readonly EntryCommentRepository $repository, - private readonly NotificationManager $manager + private readonly NotificationManager $notificationManager ) { parent::__construct($this->entityManager); } @@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void throw new UnrecoverableMessageHandlingException('Comment not found'); } - $this->manager->sendEdited($comment); + $this->notificationManager->sendEdited($comment); } } diff --git a/src/MessageHandler/Notification/SentEntryCreatedNotificationHandler.php b/src/MessageHandler/Notification/SentEntryCreatedNotificationHandler.php index 647d4ac8d..97a4a8299 100644 --- a/src/MessageHandler/Notification/SentEntryCreatedNotificationHandler.php +++ b/src/MessageHandler/Notification/SentEntryCreatedNotificationHandler.php @@ -19,7 +19,7 @@ class SentEntryCreatedNotificationHandler extends MbinMessageHandler public function __construct( private readonly EntityManagerInterface $entityManager, private readonly EntryRepository $repository, - private readonly NotificationManager $manager + private readonly NotificationManager $notificationManager ) { parent::__construct($this->entityManager); } @@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void throw new UnrecoverableMessageHandlingException('Entry not found'); } - $this->manager->sendCreated($entry); + $this->notificationManager->sendCreated($entry); } } diff --git a/src/MessageHandler/Notification/SentEntryDeletedNotificationHandler.php b/src/MessageHandler/Notification/SentEntryDeletedNotificationHandler.php index 6a386f7b2..86945b58c 100644 --- a/src/MessageHandler/Notification/SentEntryDeletedNotificationHandler.php +++ b/src/MessageHandler/Notification/SentEntryDeletedNotificationHandler.php @@ -19,7 +19,7 @@ class SentEntryDeletedNotificationHandler extends MbinMessageHandler public function __construct( private readonly EntityManagerInterface $entityManager, private readonly EntryRepository $repository, - private readonly NotificationManager $manager + private readonly NotificationManager $notificationManager ) { parent::__construct($this->entityManager); } @@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void throw new UnrecoverableMessageHandlingException('Entry not found'); } - $this->manager->sendDeleted($entry); + $this->notificationManager->sendDeleted($entry); } } diff --git a/src/MessageHandler/Notification/SentEntryEditedNotificationHandler.php b/src/MessageHandler/Notification/SentEntryEditedNotificationHandler.php index 14d02c954..444858b5f 100644 --- a/src/MessageHandler/Notification/SentEntryEditedNotificationHandler.php +++ b/src/MessageHandler/Notification/SentEntryEditedNotificationHandler.php @@ -19,7 +19,7 @@ class SentEntryEditedNotificationHandler extends MbinMessageHandler public function __construct( private readonly EntityManagerInterface $entityManager, private readonly EntryRepository $repository, - private readonly NotificationManager $manager + private readonly NotificationManager $notificationManager ) { parent::__construct($this->entityManager); } @@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void throw new UnrecoverableMessageHandlingException('Entry not found'); } - $this->manager->sendEdited($entry); + $this->notificationManager->sendEdited($entry); } } diff --git a/src/MessageHandler/Notification/SentMagazineBanNotificationHandler.php b/src/MessageHandler/Notification/SentMagazineBanNotificationHandler.php index 817afc6ec..5cfac15c0 100644 --- a/src/MessageHandler/Notification/SentMagazineBanNotificationHandler.php +++ b/src/MessageHandler/Notification/SentMagazineBanNotificationHandler.php @@ -19,7 +19,7 @@ class SentMagazineBanNotificationHandler extends MbinMessageHandler public function __construct( private readonly EntityManagerInterface $entityManager, private readonly MagazineBanRepository $repository, - private readonly NotificationManager $manager + private readonly NotificationManager $notificationManager ) { parent::__construct($this->entityManager); } @@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void throw new UnrecoverableMessageHandlingException('Ban not found'); } - $this->manager->sendMagazineBanNotification($ban); + $this->notificationManager->sendMagazineBanNotification($ban); } } diff --git a/src/MessageHandler/Notification/SentPostCommentCreatedNotificationHandler.php b/src/MessageHandler/Notification/SentPostCommentCreatedNotificationHandler.php index 990f3740f..1af07e037 100644 --- a/src/MessageHandler/Notification/SentPostCommentCreatedNotificationHandler.php +++ b/src/MessageHandler/Notification/SentPostCommentCreatedNotificationHandler.php @@ -19,7 +19,7 @@ class SentPostCommentCreatedNotificationHandler extends MbinMessageHandler public function __construct( private readonly EntityManagerInterface $entityManager, private readonly PostCommentRepository $repository, - private readonly NotificationManager $manager + private readonly NotificationManager $notificationManager ) { parent::__construct($this->entityManager); } @@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void throw new UnrecoverableMessageHandlingException('Comment not found'); } - $this->manager->sendCreated($comment); + $this->notificationManager->sendCreated($comment); } } diff --git a/src/MessageHandler/Notification/SentPostCommentDeletedNotificationHandler.php b/src/MessageHandler/Notification/SentPostCommentDeletedNotificationHandler.php index e6fa8d958..19d4957fe 100644 --- a/src/MessageHandler/Notification/SentPostCommentDeletedNotificationHandler.php +++ b/src/MessageHandler/Notification/SentPostCommentDeletedNotificationHandler.php @@ -19,7 +19,7 @@ class SentPostCommentDeletedNotificationHandler extends MbinMessageHandler public function __construct( private readonly EntityManagerInterface $entityManager, private readonly PostCommentRepository $repository, - private readonly NotificationManager $manager + private readonly NotificationManager $notificationManager ) { parent::__construct($this->entityManager); } @@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void throw new UnrecoverableMessageHandlingException('Comment not found'); } - $this->manager->sendDeleted($comment); + $this->notificationManager->sendDeleted($comment); } } diff --git a/src/MessageHandler/Notification/SentPostCommentEditedNotificationHandler.php b/src/MessageHandler/Notification/SentPostCommentEditedNotificationHandler.php index 48fded6f0..98bd3d232 100644 --- a/src/MessageHandler/Notification/SentPostCommentEditedNotificationHandler.php +++ b/src/MessageHandler/Notification/SentPostCommentEditedNotificationHandler.php @@ -19,7 +19,7 @@ class SentPostCommentEditedNotificationHandler extends MbinMessageHandler public function __construct( private readonly EntityManagerInterface $entityManager, private readonly PostCommentRepository $repository, - private readonly NotificationManager $manager + private readonly NotificationManager $notificationManager ) { parent::__construct($this->entityManager); } @@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void throw new UnrecoverableMessageHandlingException('Comment not found'); } - $this->manager->sendEdited($comment); + $this->notificationManager->sendEdited($comment); } } diff --git a/src/MessageHandler/Notification/SentPostCreatedNotificationHandler.php b/src/MessageHandler/Notification/SentPostCreatedNotificationHandler.php index 80900b344..d0791b83f 100644 --- a/src/MessageHandler/Notification/SentPostCreatedNotificationHandler.php +++ b/src/MessageHandler/Notification/SentPostCreatedNotificationHandler.php @@ -19,7 +19,7 @@ class SentPostCreatedNotificationHandler extends MbinMessageHandler public function __construct( private readonly EntityManagerInterface $entityManager, private readonly PostRepository $repository, - private readonly NotificationManager $manager + private readonly NotificationManager $notificationManager ) { parent::__construct($this->entityManager); } @@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void throw new UnrecoverableMessageHandlingException('Post not found'); } - $this->manager->sendCreated($post); + $this->notificationManager->sendCreated($post); } } diff --git a/src/MessageHandler/Notification/SentPostDeletedNotificationHandler.php b/src/MessageHandler/Notification/SentPostDeletedNotificationHandler.php index 781d8740c..6343efa84 100644 --- a/src/MessageHandler/Notification/SentPostDeletedNotificationHandler.php +++ b/src/MessageHandler/Notification/SentPostDeletedNotificationHandler.php @@ -19,7 +19,7 @@ class SentPostDeletedNotificationHandler extends MbinMessageHandler public function __construct( private readonly EntityManagerInterface $entityManager, private readonly PostRepository $repository, - private readonly NotificationManager $manager + private readonly NotificationManager $notificationManager ) { parent::__construct($this->entityManager); } @@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void throw new UnrecoverableMessageHandlingException('Post not found'); } - $this->manager->sendDeleted($post); + $this->notificationManager->sendDeleted($post); } } diff --git a/src/MessageHandler/Notification/SentPostEditedNotificationHandler.php b/src/MessageHandler/Notification/SentPostEditedNotificationHandler.php index 0712cf894..19c1f3b5d 100644 --- a/src/MessageHandler/Notification/SentPostEditedNotificationHandler.php +++ b/src/MessageHandler/Notification/SentPostEditedNotificationHandler.php @@ -19,7 +19,7 @@ class SentPostEditedNotificationHandler extends MbinMessageHandler public function __construct( private readonly EntityManagerInterface $entityManager, private readonly PostRepository $repository, - private readonly NotificationManager $manager + private readonly NotificationManager $notificationManager ) { parent::__construct($this->entityManager); } @@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void throw new UnrecoverableMessageHandlingException('Post not found'); } - $this->manager->sendEdited($post); + $this->notificationManager->sendEdited($post); } } diff --git a/src/Service/ActivityPub/Wrapper/MentionsWrapper.php b/src/Service/ActivityPub/Wrapper/MentionsWrapper.php index 2e1f92ae7..455fe4d22 100644 --- a/src/Service/ActivityPub/Wrapper/MentionsWrapper.php +++ b/src/Service/ActivityPub/Wrapper/MentionsWrapper.php @@ -12,7 +12,7 @@ class MentionsWrapper { public function __construct( - private readonly ActivityPubManager $manager, + private readonly ActivityPubManager $activityPubManager, private readonly UrlGeneratorInterface $urlGenerator, private readonly MentionManager $mentionManager, private readonly SettingsManager $settingsManager @@ -26,7 +26,7 @@ public function build(?array $mentions, ?string $body = null): array $results = []; foreach ($mentions as $index => $mention) { try { - $actor = $this->manager->findActorOrCreate($mention); + $actor = $this->activityPubManager->findActorOrCreate($mention); if (!$actor) { continue;