Skip to content

Commit 9b02e5c

Browse files
committed
Also rename other generic manager to the correct variable name
1 parent c9d3aaf commit 9b02e5c

16 files changed

+33
-33
lines changed

src/MessageHandler/ActivityPub/Inbox/AnnounceHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct(
2424
private readonly ActivityPubManager $activityPubManager,
2525
private readonly EntityManagerInterface $entityManager,
2626
private readonly MessageBusInterface $bus,
27-
private readonly VoteManager $manager,
27+
private readonly VoteManager $voteManager,
2828
private readonly VoteHandleSubscriber $voteHandleSubscriber,
2929
private readonly LoggerInterface $logger,
3030
) {
@@ -57,7 +57,7 @@ public function doWork(MessageInterface $message): void
5757
$actor = $this->activityPubManager->findActorOrCreate($message->payload['actor']);
5858

5959
if ($actor instanceof User) {
60-
$this->manager->upvote($entity, $actor);
60+
$this->voteManager->upvote($entity, $actor);
6161
$this->voteHandleSubscriber->clearCache($entity);
6262
} else {
6363
$entity->lastActive = new \DateTime();

src/MessageHandler/ActivityPub/Inbox/LikeHandler.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(
2929
private readonly ActivityPubManager $activityPubManager,
3030
private readonly VoteManager $voteManager,
3131
private readonly MessageBusInterface $bus,
32-
private readonly FavouriteManager $manager,
32+
private readonly FavouriteManager $favouriteManager,
3333
private readonly LoggerInterface $logger,
3434
) {
3535
parent::__construct($this->entityManager);
@@ -66,7 +66,7 @@ public function doWork(MessageInterface $message): void
6666
$actor = $this->activityPubManager->findActorOrCreate($message->payload['actor']);
6767
// Check if actor and entity aren't empty
6868
if (!empty($actor) && !empty($entity)) {
69-
$this->manager->toggle($actor, $entity, FavouriteManager::TYPE_LIKE);
69+
$$this->favouriteManager->toggle($actor, $entity, FavouriteManager::TYPE_LIKE);
7070
}
7171
} elseif ('Undo' === $message->payload['type']) {
7272
if ('Like' === $message->payload['object']['type']) {
@@ -78,7 +78,7 @@ public function doWork(MessageInterface $message): void
7878
$actor = $this->activityPubManager->findActorOrCreate($message->payload['actor']);
7979
// Check if actor and entity aren't empty
8080
if (!empty($actor) && !empty($entity)) {
81-
$this->manager->toggle($actor, $entity, FavouriteManager::TYPE_UNLIKE);
81+
$$this->favouriteManager->toggle($actor, $entity, FavouriteManager::TYPE_UNLIKE);
8282
$this->voteManager->removeVote($entity, $actor);
8383
}
8484
}

src/MessageHandler/Notification/SentEntryCommentCreatedNotificationHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SentEntryCommentCreatedNotificationHandler extends MbinMessageHandler
1919
public function __construct(
2020
private readonly EntityManagerInterface $entityManager,
2121
private readonly EntryCommentRepository $repository,
22-
private readonly NotificationManager $manager
22+
private readonly NotificationManager $notificationManager
2323
) {
2424
parent::__construct($this->entityManager);
2525
}
@@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void
4040
throw new UnrecoverableMessageHandlingException('Comment not found');
4141
}
4242

43-
$this->manager->sendCreated($comment);
43+
$this->notificationManager->sendCreated($comment);
4444
}
4545
}

src/MessageHandler/Notification/SentEntryCommentDeletedNotificationHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SentEntryCommentDeletedNotificationHandler extends MbinMessageHandler
1919
public function __construct(
2020
private readonly EntityManagerInterface $entityManager,
2121
private readonly EntryCommentRepository $repository,
22-
private readonly NotificationManager $manager
22+
private readonly NotificationManager $notificationManager
2323
) {
2424
parent::__construct($this->entityManager);
2525
}
@@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void
4040
throw new UnrecoverableMessageHandlingException('Comment not found');
4141
}
4242

43-
$this->manager->sendDeleted($comment);
43+
$this->notificationManager->sendDeleted($comment);
4444
}
4545
}

src/MessageHandler/Notification/SentEntryCommentEditedNotificationHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SentEntryCommentEditedNotificationHandler extends MbinMessageHandler
1919
public function __construct(
2020
private readonly EntityManagerInterface $entityManager,
2121
private readonly EntryCommentRepository $repository,
22-
private readonly NotificationManager $manager
22+
private readonly NotificationManager $notificationManager
2323
) {
2424
parent::__construct($this->entityManager);
2525
}
@@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void
4040
throw new UnrecoverableMessageHandlingException('Comment not found');
4141
}
4242

43-
$this->manager->sendEdited($comment);
43+
$this->notificationManager->sendEdited($comment);
4444
}
4545
}

src/MessageHandler/Notification/SentEntryCreatedNotificationHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SentEntryCreatedNotificationHandler extends MbinMessageHandler
1919
public function __construct(
2020
private readonly EntityManagerInterface $entityManager,
2121
private readonly EntryRepository $repository,
22-
private readonly NotificationManager $manager
22+
private readonly NotificationManager $notificationManager
2323
) {
2424
parent::__construct($this->entityManager);
2525
}
@@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void
4040
throw new UnrecoverableMessageHandlingException('Entry not found');
4141
}
4242

43-
$this->manager->sendCreated($entry);
43+
$this->notificationManager->sendCreated($entry);
4444
}
4545
}

src/MessageHandler/Notification/SentEntryDeletedNotificationHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SentEntryDeletedNotificationHandler extends MbinMessageHandler
1919
public function __construct(
2020
private readonly EntityManagerInterface $entityManager,
2121
private readonly EntryRepository $repository,
22-
private readonly NotificationManager $manager
22+
private readonly NotificationManager $notificationManager
2323
) {
2424
parent::__construct($this->entityManager);
2525
}
@@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void
4040
throw new UnrecoverableMessageHandlingException('Entry not found');
4141
}
4242

43-
$this->manager->sendDeleted($entry);
43+
$this->notificationManager->sendDeleted($entry);
4444
}
4545
}

src/MessageHandler/Notification/SentEntryEditedNotificationHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SentEntryEditedNotificationHandler extends MbinMessageHandler
1919
public function __construct(
2020
private readonly EntityManagerInterface $entityManager,
2121
private readonly EntryRepository $repository,
22-
private readonly NotificationManager $manager
22+
private readonly NotificationManager $notificationManager
2323
) {
2424
parent::__construct($this->entityManager);
2525
}
@@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void
4040
throw new UnrecoverableMessageHandlingException('Entry not found');
4141
}
4242

43-
$this->manager->sendEdited($entry);
43+
$this->notificationManager->sendEdited($entry);
4444
}
4545
}

src/MessageHandler/Notification/SentMagazineBanNotificationHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SentMagazineBanNotificationHandler extends MbinMessageHandler
1919
public function __construct(
2020
private readonly EntityManagerInterface $entityManager,
2121
private readonly MagazineBanRepository $repository,
22-
private readonly NotificationManager $manager
22+
private readonly NotificationManager $notificationManager
2323
) {
2424
parent::__construct($this->entityManager);
2525
}
@@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void
4040
throw new UnrecoverableMessageHandlingException('Ban not found');
4141
}
4242

43-
$this->manager->sendMagazineBanNotification($ban);
43+
$this->notificationManager->sendMagazineBanNotification($ban);
4444
}
4545
}

src/MessageHandler/Notification/SentPostCommentCreatedNotificationHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SentPostCommentCreatedNotificationHandler extends MbinMessageHandler
1919
public function __construct(
2020
private readonly EntityManagerInterface $entityManager,
2121
private readonly PostCommentRepository $repository,
22-
private readonly NotificationManager $manager
22+
private readonly NotificationManager $notificationManager
2323
) {
2424
parent::__construct($this->entityManager);
2525
}
@@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void
4040
throw new UnrecoverableMessageHandlingException('Comment not found');
4141
}
4242

43-
$this->manager->sendCreated($comment);
43+
$this->notificationManager->sendCreated($comment);
4444
}
4545
}

src/MessageHandler/Notification/SentPostCommentDeletedNotificationHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SentPostCommentDeletedNotificationHandler extends MbinMessageHandler
1919
public function __construct(
2020
private readonly EntityManagerInterface $entityManager,
2121
private readonly PostCommentRepository $repository,
22-
private readonly NotificationManager $manager
22+
private readonly NotificationManager $notificationManager
2323
) {
2424
parent::__construct($this->entityManager);
2525
}
@@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void
4040
throw new UnrecoverableMessageHandlingException('Comment not found');
4141
}
4242

43-
$this->manager->sendDeleted($comment);
43+
$this->notificationManager->sendDeleted($comment);
4444
}
4545
}

src/MessageHandler/Notification/SentPostCommentEditedNotificationHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SentPostCommentEditedNotificationHandler extends MbinMessageHandler
1919
public function __construct(
2020
private readonly EntityManagerInterface $entityManager,
2121
private readonly PostCommentRepository $repository,
22-
private readonly NotificationManager $manager
22+
private readonly NotificationManager $notificationManager
2323
) {
2424
parent::__construct($this->entityManager);
2525
}
@@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void
4040
throw new UnrecoverableMessageHandlingException('Comment not found');
4141
}
4242

43-
$this->manager->sendEdited($comment);
43+
$this->notificationManager->sendEdited($comment);
4444
}
4545
}

src/MessageHandler/Notification/SentPostCreatedNotificationHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SentPostCreatedNotificationHandler extends MbinMessageHandler
1919
public function __construct(
2020
private readonly EntityManagerInterface $entityManager,
2121
private readonly PostRepository $repository,
22-
private readonly NotificationManager $manager
22+
private readonly NotificationManager $notificationManager
2323
) {
2424
parent::__construct($this->entityManager);
2525
}
@@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void
4040
throw new UnrecoverableMessageHandlingException('Post not found');
4141
}
4242

43-
$this->manager->sendCreated($post);
43+
$this->notificationManager->sendCreated($post);
4444
}
4545
}

src/MessageHandler/Notification/SentPostDeletedNotificationHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SentPostDeletedNotificationHandler extends MbinMessageHandler
1919
public function __construct(
2020
private readonly EntityManagerInterface $entityManager,
2121
private readonly PostRepository $repository,
22-
private readonly NotificationManager $manager
22+
private readonly NotificationManager $notificationManager
2323
) {
2424
parent::__construct($this->entityManager);
2525
}
@@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void
4040
throw new UnrecoverableMessageHandlingException('Post not found');
4141
}
4242

43-
$this->manager->sendDeleted($post);
43+
$this->notificationManager->sendDeleted($post);
4444
}
4545
}

src/MessageHandler/Notification/SentPostEditedNotificationHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SentPostEditedNotificationHandler extends MbinMessageHandler
1919
public function __construct(
2020
private readonly EntityManagerInterface $entityManager,
2121
private readonly PostRepository $repository,
22-
private readonly NotificationManager $manager
22+
private readonly NotificationManager $notificationManager
2323
) {
2424
parent::__construct($this->entityManager);
2525
}
@@ -40,6 +40,6 @@ public function doWork(MessageInterface $message): void
4040
throw new UnrecoverableMessageHandlingException('Post not found');
4141
}
4242

43-
$this->manager->sendEdited($post);
43+
$this->notificationManager->sendEdited($post);
4444
}
4545
}

src/Service/ActivityPub/Wrapper/MentionsWrapper.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class MentionsWrapper
1313
{
1414
public function __construct(
15-
private readonly ActivityPubManager $manager,
15+
private readonly ActivityPubManager $activityPubManager,
1616
private readonly UrlGeneratorInterface $urlGenerator,
1717
private readonly MentionManager $mentionManager,
1818
private readonly SettingsManager $settingsManager
@@ -26,7 +26,7 @@ public function build(?array $mentions, ?string $body = null): array
2626
$results = [];
2727
foreach ($mentions as $index => $mention) {
2828
try {
29-
$actor = $this->manager->findActorOrCreate($mention);
29+
$actor = $this->activityPubManager->findActorOrCreate($mention);
3030

3131
if (!$actor) {
3232
continue;

0 commit comments

Comments
 (0)