Rename method in repository
[MAILPOET-4685]
This commit is contained in:
@@ -404,8 +404,8 @@ class NewslettersRepository extends Repository {
|
|||||||
/**
|
/**
|
||||||
* @return NewsletterEntity[]
|
* @return NewsletterEntity[]
|
||||||
*/
|
*/
|
||||||
public function findSendigNotificationHistoryWithPausedTask(NewsletterEntity $newsletter): array {
|
public function findSendingNotificationHistoryWithoutPausedTask(NewsletterEntity $newsletter): array {
|
||||||
$result = $this->entityManager->createQueryBuilder()
|
return $this->entityManager->createQueryBuilder()
|
||||||
->select('n')
|
->select('n')
|
||||||
->from(NewsletterEntity::class, 'n')
|
->from(NewsletterEntity::class, 'n')
|
||||||
->join('n.queues', 'q')
|
->join('n.queues', 'q')
|
||||||
@@ -418,8 +418,7 @@ class NewslettersRepository extends Repository {
|
|||||||
->setParameter('type', NewsletterEntity::TYPE_NOTIFICATION_HISTORY)
|
->setParameter('type', NewsletterEntity::TYPE_NOTIFICATION_HISTORY)
|
||||||
->setParameter('status', NewsletterEntity::STATUS_SENDING)
|
->setParameter('status', NewsletterEntity::STATUS_SENDING)
|
||||||
->setParameter('taskStatus', ScheduledTaskEntity::STATUS_PAUSED)
|
->setParameter('taskStatus', ScheduledTaskEntity::STATUS_PAUSED)
|
||||||
->getQuery()->execute();
|
->getQuery()->getResult();
|
||||||
return $result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -110,7 +110,7 @@ class PostNotificationScheduler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function createPostNotificationSendingTask(NewsletterEntity $newsletter): ?ScheduledTaskEntity {
|
public function createPostNotificationSendingTask(NewsletterEntity $newsletter): ?ScheduledTaskEntity {
|
||||||
$notificationHistory = $this->newslettersRepository->findSendigNotificationHistoryWithPausedTask($newsletter);
|
$notificationHistory = $this->newslettersRepository->findSendingNotificationHistoryWithoutPausedTask($newsletter);
|
||||||
if (count($notificationHistory) > 0) {
|
if (count($notificationHistory) > 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@@ -485,11 +485,6 @@ parameters:
|
|||||||
count: 2
|
count: 2
|
||||||
path: ../../lib/Newsletter/NewslettersRepository.php
|
path: ../../lib/Newsletter/NewslettersRepository.php
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Method MailPoet\\\\Newsletter\\\\NewslettersRepository\\:\\:findSendigNotificationHistoryWithPausedTask\\(\\) should return array\\<MailPoet\\\\Entities\\\\NewsletterEntity\\> but returns mixed\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: ../../lib/Newsletter/NewslettersRepository.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Method MailPoet\\\\Newsletter\\\\Renderer\\\\Renderer\\:\\:postProcessTemplate\\(\\) should return string but returns mixed\\.$#"
|
message: "#^Method MailPoet\\\\Newsletter\\\\Renderer\\\\Renderer\\:\\:postProcessTemplate\\(\\) should return string but returns mixed\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
@@ -485,11 +485,6 @@ parameters:
|
|||||||
count: 2
|
count: 2
|
||||||
path: ../../lib/Newsletter/NewslettersRepository.php
|
path: ../../lib/Newsletter/NewslettersRepository.php
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Method MailPoet\\\\Newsletter\\\\NewslettersRepository\\:\\:findSendigNotificationHistoryWithPausedTask\\(\\) should return array\\<MailPoet\\\\Entities\\\\NewsletterEntity\\> but returns mixed\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: ../../lib/Newsletter/NewslettersRepository.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Method MailPoet\\\\Newsletter\\\\Renderer\\\\Renderer\\:\\:postProcessTemplate\\(\\) should return string but returns mixed\\.$#"
|
message: "#^Method MailPoet\\\\Newsletter\\\\Renderer\\\\Renderer\\:\\:postProcessTemplate\\(\\) should return string but returns mixed\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
@@ -484,11 +484,6 @@ parameters:
|
|||||||
count: 2
|
count: 2
|
||||||
path: ../../lib/Newsletter/NewslettersRepository.php
|
path: ../../lib/Newsletter/NewslettersRepository.php
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Method MailPoet\\\\Newsletter\\\\NewslettersRepository\\:\\:findSendigNotificationHistoryWithPausedTask\\(\\) should return array\\<MailPoet\\\\Entities\\\\NewsletterEntity\\> but returns mixed\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: ../../lib/Newsletter/NewslettersRepository.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Method MailPoet\\\\Newsletter\\\\Renderer\\\\Renderer\\:\\:postProcessTemplate\\(\\) should return string but returns mixed\\.$#"
|
message: "#^Method MailPoet\\\\Newsletter\\\\Renderer\\\\Renderer\\:\\:postProcessTemplate\\(\\) should return string but returns mixed\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
Reference in New Issue
Block a user